Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why Does my GUI keep on becoming Visible after respawning?

So I'm very new to coding and I'm trying to make a game with some friends. I made a script so that when you click on an ImageButton it switches your team, and the GUI Visibility is set to false. It works, however when you reset or respawn ingame, the GUI becomes visible again, why is this?

Note :The GUI is set to visible = true in the beginning (as if it were the main menu)

local player = script.Parent.Parent.Parent.Parent.Parent


script.Parent.MouseButton1Click:connect(function()

player.Team = game.Teams.CounterTerrorist

script.Parent.Parent.Visible = false

script.Parent.Parent.Parent.BottomFrame.Visible = false

script.Parent.Parent.Parent.TextLabel.Visible = false

end)

1 comment

0

Press disabled on the GUI, then it will only appear for the desired people.

1 answer

Check if you have ResetOnSpawn still enabled in the properties for the ScreenGUI.

Example: https://imgur.com/a/9Y2zv79

I had this problem when I started too. Hope it solves the problem!

This discussion is preserved as it was. New answers, comments, and votes are closed.