So apparently I'm trying to use ScreenGui.ResetOnSpawn, My goal is to make the ScreenGui not parenting PlayerGui after a player respawns. However, it seems that it keep getting parented to PlayerGui after a player respawns.
game.Players.PlayerAdded:Connect(function(plr)
local UI = Instance.new("ScreenGui")
UI.ResetOnSpawn = false
UI.Parent = plr.PlayerGui
end)
Is there anyway to resolve this? Thanks.

1 comment
You can use Humanoid.Died to check if the player died, then use that event to trigger a function that would destroy the ScreenGui. https://developer.roblox.com/api-reference/event/Humanoid/Died