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

How to stop a Gui from resetting when a Player dies?

So I have this Problem. I made a simple script the use loop and changes the Texts in the Textlabel. So I wondering how can I make the script continue the loop after the Player has resetted.

v = 10
while true do
	script.Parent.Text = "1"
	wait(v)
	script.Parent.Text = "2"
	wait(v)
	script.Parent.Text = "3"
	wait(v)
end

If you could help I would very much appreciate it :)

1 answer

This is actually much easier than you probably thought it was! Roblox has a hidden property of StarterGui called ResetPlayerGuiOnSpawn that when set to true resets the gui on spawn. If you set it to false, the gui will not reset!

game:GetService("StarterGui").ResetPlayerGuiOnSpawn = false

11 comments

0

Are you kidding me...

0

Sorry I pasted this inside my script and the Gui still reset after I die.

0

I'm pretty sure you would need to make it a localscript that's parent is the screengui.

0

Yes, it must be in a local script

0

Wondering if there's a method of doing this without this. It's possible by Kohl's Infinite Admin..

0

It's possible yeah, you just have to manually copy/paste the gui's and make sure all of your functions account for the duration when the gui's reset

0

Where will i put the script? screengui? startergui?

0

I put it in a Local Script child of the StarterGUI, but my GUI still resets after death

0

Xzenerne, mine still resets as well. Exact command in a Local Script child of the StarterGUI. No clue what im doing wrong

0

Getting this too. Keeps resetting no matter what the parent is. StarterGui, ScreenGui, Frame, TextLabel. I even tried an intValue with the parent as a TextLabel

0

It should be in a normal script in ServerScriptService.

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