Client to Server

Scripts

LocalScript under TextButton

local button = script.Parent

local ReplicatedStorage = game:GetService("ReplicatedStorage")
 
local remoteEvent = ReplicatedStorage:WaitForChild("RemoteEvent")

local function triggerEvent()
    remoteEvent:FireServer()
end

button.MouseButton1Click:Connect(triggerEvent)

ServerScriptService

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage:WaitForChild("RemoteEvent")
 
local function newPart()
    local part = Instance.new('Part')
    part.Parent = game.Workspace
end
 
remoteEvent.OnServerEvent:Connect(newPart)