TextButton makes Part appear

I’ve been trying to make a script when you click a textButton a block will appear only for the persons pov, but It won’t work. Does anyone know how to create one?

That should be a very simple script.

local TextButton = -- your text button

TextButton.MouseButton1Click:Connect(function()
    local Block = Instance.new("Part")
    Block.Anchored = true
    Block.Parent = workspace
end)

This should be a LocalScript.

If you’re looking to show the block to the whole server, then you’d have to use a RemoteEvent.