Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I make not make all guis reset after player resets?

Asked by 5 years ago

So, I was trying to find a way where the Health GUI gets a reset back to when the player is not dead anymore but when I was trying to script this, the main gui would also be resetted. Is there a way for the other GUI (ScreenGUI) not get a reset after the player resets? (or dies)

-- Local Varialbes
local ScreenGui = script.ScreenGui
local HealthGui = script.HealthGui

-- Initialization

game.StarterGui.ResetPlayerGuiOnSpawn = false
ScreenGui.Parent = Player:WaitForChild("PlayerGui")

game.StarterGui.ResetPlayerGuiOnSpawn = true
HealthGui.Parent = Player:WaitForChild("PlayerGui")
2
Use the ResetOnSpawn property of ScreenGui instead. (ScreenGui.ResetOnSpawn = false) Overscores 381 — 5y
0
what Simpletton 82 — 5y
0
So you want one gui to disapear. And another gui to not disapear? Skydoeskey 108 — 5y
0
yes, how can I make this happen? Simpletton 82 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

In the Explorer tab, there is a property on the ScreenGui called ResetOnSpawn. Disable that tick.

0
what Simpletton 82 — 5y
Ad

Answer this question