✓ Accepted answer
Ok, I'm going to make some assumptions here since you didn't give all the information needed. So I'm going to assume that this is a local script.
The reason this wouldn't work is because you are using the starter gui and not the player gui. The reason to use the player gui is because it is a child of the player and everything in the starter gui initially when a player joins is cloned into each player's player gui
So i think this might solve your problems:
local GuiText = game.Players.LocalPlayer:WaitForChild("PlayerGui").ScreenGui.TextBox
GuiText.Visible = false
game.Workspace.GUIPart.SurfaceGui.TextButton.MouseButton1Click:Connect(function()
GuiText.Visible = true
end)
4 comments
Is this a local script?
No.
Try making it a local script.
I did.