You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
Get help to make a starterplayerscript reset on spawn.
-
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.
-
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](//devforum-uploads.s3.dualstack.us-east-2.amazonaws.com/uploads/original/5X/3/1/8/8/31883e600837d9569e174d8363e28c05424fb90a.png)
Would removing it on a Humanoid.Died event work? I’ve never used that plugin so I’m not exactly sure how it works.