Why do local scripts reset on death?

I have a script that creates a Part when a Player First joins. But if they reset, the Part gets created again. I don’t know why this is happening.

1 Like

Where are you placing this local script?

I put it into servercharacterscripts

I think you mean StarterCharacterScripts, scripts placed in here are run each time a player spawns. If you want to have a script only run when the player first joins, you want to put it in StarterPlayerScripts.


If I’m not mistaken, StarterCharacterScripts will load on each Character respawn. Try putting it under StarterPlayerScripts instead.


Have you considered using game.Players.PlayerAdded() for this? This will run when the Player joins, and you can call game.Players.PlayerRemoving() to remove the part when they leave.