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

ResetOnSpawn Not Working For What Reason?

So, I'm trying to turn off ResetOnSpawn, I tried to do this aswell.

game.StarterGui.TeamChangeGui.ResetOnSpawn = false

So far, everything I've tried, Hasn't Worked. Can Anyone Help Me Out On This Please? Thank You.

1 comment

0

So you want the GUI to not show up once the player re-spawns?

2 answers

✓ Accepted answer

Hello, kingbooker48!

Use this script:

game.Players.PlayerAdded:Connect(function(plr)
	while not game.Players:FindFirstChild(plr.Name) do wait() end
	script.ScreenGui.Parent = game.Players[plr.Name].PlayerGui
end)

ATTENTION: Script must have a child called "ScreenGui" (The gui that will be shown on first join)

Good Luck with your games!

Scripts only run when the game starts, and if your gui is in the starter gui, it will automatically give any users in the game the gui, which means you have to reference the players playergui and get from there.

game.Players[""].PlayerGui:WaitForChild("TeamChangeGui").ResetOnSpawn = false

There there is no point in "script" doing it, as if your not making the gui from script, You can simply just press ResetOnSpawn and make it false in the properties of the gui. In which case you are script making the gui, you would have to use this code instead:

<varible>.ResetOnSpawn = false

1 comment

0

@HeComesAt_Night I tried to change the properties, Didn't Work.

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