Answered by
6 years ago Edited 6 years ago
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:
1 | local GuiText = game.Players.LocalPlayer:WaitForChild( "PlayerGui" ).ScreenGui.TextBox |
3 | game.Workspace.GUIPart.SurfaceGui.TextButton.MouseButton 1 Click:Connect( function () |