Text labels in Frame are Dissapearing when Player Dies

So i have this thing where you roll and it gives you something and places it in a frame to show what you got. The issue is that every time the player dies, everything inside the frame disappears.
3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

Heres the issue in a video:

my script:

local btn = script.Parent
local plr = game.Players.LocalPlayer
local module = require(game.ReplicatedStorage.ModuleScript)
local list = plr.PlayerGui.CurseListGui.CurseFrame

btn.MouseButton1Click:Connect(function()
	local random = module:ChooseRandom()

	local function createLabel(text)
		local newLabel = Instance.new("TextLabel")
		newLabel.Text = text
		newLabel.Size = UDim2.new(1, 0, 0, 30) -- Full width, 30px tall
		newLabel.BackgroundTransparency = 1
		newLabel.TextScaled = true
		newLabel.Parent = list
	end

	if random == "Lebron" then
		print("LEBRON")
		createLabel("LEBRON")
		local event = game.ReplicatedStorage.Lebron
		event:Fire()
		btn.Parent.Parent.Adornee:Destroy()

	elseif random == "Goggins" then
		print("I don't stop when I'm tired, I stop when I'm done.")
		createLabel("David Goggins")
		local event = game.ReplicatedStorage.Goggins
		event:Fire()
		btn.Parent.Parent.Adornee:Destroy()

	elseif random == "Jumpscare" then
		print("jumpscared")
		createLabel("Jumpscare")
		btn.Parent.Parent.Adornee:Destroy()

	elseif random == "America" then
		print("America")
		createLabel("America")
		btn.Parent.Parent.Adornee:Destroy()
	end
end)

This is really confusing to me and I’m new to scripting, I appreciate any help.

1 Like

try turning the ScreenGui’s ResetOnSpawn property off.

Thank you so much for the solution