How do I permanently deactivate a frame?

,

So I’m trying to make a frame that appears to explain how to play the game and I have a text button inside that frame and when that button is clicked it sets the frame to not visible. Problem is, when someone dies, the frame respawns even though I have frame.Visible = false . I’ve tried to look for solutions on the dev forum but all of them dont make sense, I’ve tried setting ResetOnSpawn to false and other things like frame:Destroy() but those did nothing also there is no error logs or anything.
Please help ;(

1 Like

Is it being created or copied to the player’s PlayerGui when they respawn? Setting the ScreenGui’s ResetOnSpawn to false should’ve did it.

Can we see what code you’ve written?

1 Like

Sure, please ignore the cheese variable as well as the fact i individually tweened each text block line

local button = script.Parent
local frame = button.Parent
local tweenService = game:GetService("TweenService")
local cheese = false

local p1 = frame.TL1
local p2 = frame.TL2
local p3 = frame.TL3
local p4 = frame.TL4
local p5 = frame.TL5

local props = {
	["Transparency"] = 1
}
local props2 = {
	["TextTransparency"] = 1,
	["BackgroundTransparency"] = 1
}

local twenInfo = TweenInfo.new(.5, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0)
local tweens = tweenService:Create(frame, twenInfo, props)
local tween1 = tweenService:Create(p1, twenInfo, props2)
local tween2 = tweenService:Create(p2, twenInfo, props2)
local tween3 = tweenService:Create(p3, twenInfo, props2)
local tween4 = tweenService:Create(p4, twenInfo, props2)
local tween5 = tweenService:Create(p5, twenInfo, props2)
local tween6 = tweenService:Create(button, twenInfo, props2)

button.MouseButton1Click:Connect(function()
	tweens:Play()
	tween1:Play()
	tween2:Play()
	tween3:Play()
	tween4:Play()
	tween5:Play()
	tween6:Play()
	wait(.75)
	frame.Visible = false
end)