Im trying to make a button that hides a whole gui for my clicker game so i can make a sword fighting room.
script.Parent.MouseButton1Click:connect(function ()
if script.Parent.Text == "Hide Game" then
game.StarterGui.Game.Background = false
script.Parent.Text = "Show Game"
else
game.StarterGui.Game.Background = false
script.Parent.Text = "Hide Game"
end
end)`
I've already tried:
script.Parent.MouseButton1Click:connect(function ()
if script.Parent.Text == "Hide Game" then
game.Players.LocalPlayer.PlayerGui.Game.Background = false
script.Parent.Text = "Show Game"
else
game.Players.LocalPlayer.PlayerGui.Game.Background = false
script.Parent.Text = "Hide Game"
end
end)`

1 comment
Thanks it worked!