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

How do I make a GUI disappear, even after the person respawns?

I'm working on a GUI that gives you cash when you click it, and then it disappears, forever.

I've tried to make visible false, remove it, destroy it, move it to the workspace, and they all work, until you respawn and the GUI is back.

Any help is appreciated.

2 answers

✓ Accepted answer

Don't put the script inside the StarterGui. If that is where you put it, then it will always come back every time you respawn. Instead, leave it in the Workspace or somewhere else and make it clone to the player when they join the game and spawn.

gui = -- Add gui's location relative to the script.

game.Players.PlayerAdded:connect(function(player)
	local a = gui:clone()
	a.Parent = player.StarterGui
end)

Sort of like what Nifer said, but again he screwed up a bit.

gui=game.Lighting.CashGui --Change to the Name

game.Players.PlayerAdded:connect(function(player)
wait()
gui:lone().Parent=player.PlayerGui
end)

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