UI Still Appears After Reset; ResetOnSpawn is disabled

For some reason, my loading screen UI keeps re-appearing when the player resets/respawns. This wasn’t an issue before, ResetOnSpawn was disabled and the loading screen didn’t appear when the player died.

However, all of a sudden it has begun re-appearing again. ResetOnSpawn is currently Disabled yet still re-appears on death, this is the script inside of it.

local holder = script.Parent.Holder
script.Parent.Enabled = true
game.ReplicatedFirst:RemoveDefaultLoadingScreen()
script.IntroMusic:Play()
local TweenService = game:GetService("TweenService")

local function start()
	local numAssets = #game:GetDescendants()
	local assetsLoaded = 0

	local startTime = tick()
	repeat
		local elapsedTime = tick() - startTime
		local progress = math.min(elapsedTime / 6, 1)
		holder.BarFrame.Bar.Size = UDim2.new(progress, 0, 1, 0)
		wait()
	until elapsedTime >= 6

	holder:TweenPosition(UDim2.new(0.5, 0, -1.5, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 1)

	local volume = 1
	while volume > 0 do
		volume = math.max(volume - 0.1, 0)
		script.IntroMusic.Volume = volume
		wait(1)
	end

	script.IntroMusic:Stop()
end

start()

Any help would be appreciated, thanks.

How does the Game Intro UI / LoadingScreen get inside the PlayerGui?

Is it inside the StarterGui when the player joins or are you adding it with a script?

It’s inside of StarterGui. (char limittttttttttttttttttt)

Hello, the GUI has reset on spawn set to false, but it is inside of a folder, and the folder does reset on spawn

2 Likes

Thanks so much! Will adjust this now.

Something I’d like to mention as an FYI for anyone who reads through here and is curious about that behavior. Although that might not have been an intended behavior of the property, with a bug report being created for it in 2019, it has since been confirmed in a newer bug report from 2023 that the behavior would not be changed, as to avoid breaking any existing games.

This means that ResetOnSpawn will continue to function in a way where it only works when the GUI has been directly placed into the StarterGui service:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.