How can I make StarterPlayerScript local script reset on death?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    Get help to make a starterplayerscript reset on spawn.

  2. What is the issue? Include screenshots / videos if possible!
    Works when you first join, but on death as it doesnt reset the script, this happens.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Characteradded, and a few other things.

Use StarterCharacterScripts instead of StarterPlayerScripts.

I can’t

I’m using the TopBarPlus, which requires StarterPlayerScripts, otherwise it won’t work.

I see that you said you tried CharacterAdded but I just wrote a print statement and it worked just fine.

game.Players.LocalPlayer.CharacterAdded:Connect(function(char)
	print(char.Name .. " loaded")
end)

Did you place it in starterplayerscripts?

Yes, StarterCharacterScripts run when the character loads, so a CharacterAdded event wouldn’t be needed.

Okay, putting it in the characterscripts works, but it creates a new one each time. How can I stop this from happening?
image

Would removing it on a Humanoid.Died event work? I’ve never used that plugin so I’m not exactly sure how it works.