My main script is supposed to change all players WalkSpeed and JumpPower to 0 before teleporting them into the game map, but it seems it only removes the WalkSpeed and JumpPower for 1 player and not everyone, and i have no idea why.
while true do
wait(1)
local plrs = game.Players:GetPlayers()
if #plrs > 1 then
t = 10
repeat
t = t-1
s.Value = "Intermission "..t
wait(1)
until t == 0
s.Value = "Loading..."
script.StartingGame.Value = "True"
local plrs = game.Players:GetPlayers()
for i = 1, #plrs do
plrs[i].Character.Speed.Disabled = true -- Disable the script that give more WalkSpeed when walking
plrs[i].Character.SpeedFoV.Disabled = true -- Disable the FoV changer script
plrs[i].Character.Humanoid.WalkSpeed = 0
plrs[i].Character.Humanoid.JumpPower = 0
local mapselect = game.ReplicatedStorage.Games:GetChildren()
local choose = math.random(1, #mapselect)
curnum = 0
for i =1,#mapselect do
curnum = curnum + 1
if curnum == choose then
mapselect[i]:Clone().Parent = workspace
curmap = mapselect[i].Name
script["Chosen Map"].Value = mapselect[i].Name
end
end
wait(2)
local plrs = game.Players:GetPlayers()
for i = 1,#plrs do
local num = math.random(1,12)
plrs[i].Character.Head.CFrame = CFrame.new(workspace.Teleports["Part"..num].Position)
plrs[i].Character.Parent = workspace.Ingame
end
wait(3)
script.StartingGame.Value = "False"
s.Value = "Ready?"
wait(20)
s.Value = "RUSH"
plrs[i].Character.Speed.Disabled = false
plrs[i].Character.SpeedFoV.Disabled = false
plrs[i].Character.Humanoid.WalkSpeed = 16
plrs[i].Character.Humanoid.JumpPower = 50
wait(5)
t=160 -- Round starting time
I know i could do this in other ways but i want to make it work with a For Loop
Note: It only changes the WalkSpeed and JumpPower to 1 person but when it comes to teleporting everyone to the game it loops through every player completely fine