wait(5) game.Players.PlayerAdded:connect(function(plr) repeat wait() until plr.Character plr.Character.Torso.Anchored=true end)
Your problem is the wait(5)
at the top of your script.
If you wait five seconds before connecting the event, the first player who joins won't be anchored because the event wasn't connected when they joined the server.
Remove the wait and you should be fine.