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

Once a bool value, inside of playerscripts is true, a gui inside of playergui is destroyed?

The name of the bool value is HasKey. The name of the gui is ChestGUI.

1 answer

✓ Accepted answer

You can create localscript and place it inside PlayerGui

local Player = game.Players.LocalPlayer

while wait() do
	if Player.PlayerGui:FindFirstChild("ChestGUI") then
		if Player.PlayerScripts.HasKey.Value == true then
			Player.PlayerGui:FindFirstChild("ChestGUI"):Destroy()
		end
	end
end

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