So, This makes all player's Walkspeeds to 0 (so that they cannot move) then after 1 second makes their speed back to normal (so that they can move), but It doesn't make all player's speed back to 16, some players are still not able to move. Help me fix this?
local Players = game.Players:GetPlayers() for i = 1, #Players do Players[i].Character.Humanoid.WalkSpeed = 0 wait(1) Players[i].Character.Humanoid.WalkSpeed = 16
Well, first you should of set a new variable "numplayers" For an examp. "local numPlayers = game.Players.NumPlayers" for number of players. Here you go.
wait(3)--Set a wait time just for safety measures lol local numPlayers = game.Players.NumPlayers --Numbers of players on the server local Players = game.Players:GetPlayers() for i = numPlayers, #Players do--Since i = numPlayers, it sets speed of how much people are on the server and not little bit of people and the rest not. Players[i].Character.Humanoid.WalkSpeed = 0-- Speed is set of number of people on server wait(1) Players[i].Character.Humanoid.WalkSpeed = 16-- Speed is set of number of people on server end --You can thank me IIApexGamerII, please accept if it works. (Then you can delete all these "--")
P.S. Please accept if it works, I would truly love to be accept.