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

My GUI button does not make GUI's Visible. What happend?

I have a GUI button that is supposed to make GUI's Visible, but instead makes the GUI's appear after you die. What happend with the script????

-- script:

local Police = game.Players.LocalPlayer:FindFirstChild("PlayerGui"):FindFirstChild("Police")
local Prisoner = game.Players.LocalPlayer:FindFirstChild("PlayerGui"):FindFirstChild("Prisoner")
local Citizen = game.Players.LocalPlayer:FindFirstChild("PlayerGui"):FindFirstChild("Citizen")

script.Parent.MouseButton1Click:Connect(function()
	Police.Visible = true
	Citizen.Visible = true
	Prisoner.Visible = true
end)


Can a user find the answer to my query?

2 answers

✓ Accepted answer

Since this is a GUI, what you want to do is go to the properties of the ScreenGui, and then untick the box that says "ResetOnSpawn". This makes it so that it doesn't reappear once you respawn

The script has to be in a local script for any Gui to become visible.

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