Hierarchy:
> game > StarterGui > SurfaceGui > TextButton > LocalScript
Script:
local label = game.StarterGui.ScreenGui.TextLabel local button = script.Parent button.MouseButton1Click:Connect(function() if label.Visible == true then label.Visible = false elseif label.Visible == false then label.Visible = true end end)
LocalScript inside of the button and write this.
script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.TextLabel.Visible == true then script.Parent.Parent.TextLabel.Visible = false elseif script.Parent.Parent.TextLabel.Visible == false then script.Parent.Parent.TextLabel.Visible = true end end)
Any changes you make in the StarterGui will not have an affect on the player's screen.
Hope this helped! If this worked, don't forget to select this as an answer!