I'm not sure, but do you use player added pr something similar to that? for example (i dont know how to use player added or set it up)
--localplayer added part --code print"this is where the code goes and localplayer loaded in " end
if you need any clarifictaion ask! thanks
You can have a local script inside of the StarterCharacterScripts
This is where you'd find it.
The scripts inside there run every time the character loads into game
if you only want to do something ONCE when the
edit: you can also do this to make code run whenever a player joins a game
game.Players.PlayerAdded:Connect(function(player) print("A player has entered: " .. player.Name) end)