Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

can someone tell me why this isnt working?

Asked by 8 years ago

while wait(1) do if game.Players.NumPlayers > 1 then print("Starting") wait(2) local x = game.Players:GetChildren() local choose1 = x[math.random(1, #x)] choose1.Character.Humanoid.WalkSpeed = 0 choose1.Character.Torso.CFrame = workspace.spawn1.CFrame choose1.Backpack.InRound.Value = true print(choose1.Name.." was picked") wait(2) for i, v in pairs(game.Players:GetChildren())do if v.Backpack.InRound.Value == false then local choose2 = v[math.random(1, #v)] print(choose2.Name.." was picked") choose2.Character.Torso.CFrame = workspace.spawn2.CFrame choose2.Character.Humanoid.WalkSpeed = 0 end end end end

Answer this question