Issue with LocalScript Triggering RunService Warning on Player Death

I am testing out a script that print something everytime you die. But the issue is that I get a warning. However the script works.

The warning that I get is:

05:56:07.347 RunService:UnbindFromRenderStep removed different functions with same reference name utility-focus-state-inspect-PixelCrypth 2 times. - Studio

Localscript: (located in StarterCharacterScripts)

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")

-- Check if the Died event is already connected
local isConnected = false

local function OnPlayerDied()
	-- Ensure the event is only fired once
print("ur ded")
end

-- Connect the Died event only if it's not already connected
if not isConnected then
	Humanoid.Died:Connect(OnPlayerDied)
end

Would anyone be enable to help? I even tried to check the connection if it’s not connected yet but still no use. It always shows first in the output the orange warning when I reset my character.

Screenshot:

2 Likes

That’s a bug with Roblox’s CoreScripts:

You can fix it by disabling the “Updated Experience Controls” Beta Feature, if you want to.

2 Likes

Is there a work around? Like without disabling something from roblox corescripts but improving it so the warning will be solved?

I though warnings useally happen when there is something wrong with the script.

Thanks anyway for reading!

1 Like

It’s not your script, it’s just a small bug in the Core scripts that happen when you turn on a Beta Feature - features that aren’t fully released and could have bugs.

The warning is from a Roblox engineer making a mistake in their code, it’s not your fault. You can just ignore it, or turn off the Beta Feature.

1 Like

Ah I see! So it doesn’t effect the game right?

1 Like

No, it doesn’t affect anything. Warnings are just prints, just more obvious and important. The problematic ones will be errors.

Ur my hero, thank you for your great help you have showen today!

1 Like

i also had this same bug a while back, with the exact same error message! next time roblox should make sure to not auto-enable these kind of things.

1 Like

Ye it’s kinda confusing. I was researching where it came first from the game.

Then basically making this test script to see if similair thing happens and well after that researching what else may be the issue and asking devforum.

I am very glad that Roblox has such a helpful community dedicated on scripting help and fixing issues. Thank you all again for the great assistance.