I created a script, and testing it, and it gave a weird error I can't understand.
14:38:27.943 - ServerScriptService.Script:103: bad argument #2 to 'random' (interval is empty)
14:38:27.944 - Script 'ServerScriptService.Script', Line 103
14:38:27.945 - Stack End
Any solution?
Faulty code:
while true do contestants = {} blue = {} yellow = {} green = {} for _, player in pairs(game.Players:GetPlayers()) do if player and player.Character then local humanoid = player.Character:WaitForChild("Humanoid") if humanoid and humanoid.Health > 0 and player.TeamColor.Name == "Lime green" then table.insert(contestants, player) table.insert(green, player) elseif humanoid and humanoid.Health > 0 and player.TeamColor.Name == "New Yeller" then table.insert(contestants, player) table.insert(yellow, player) elseif humanoid and humanoid.Health > 0 and player.TeamColor.Name == "Really blue" then table.insert(contestants, player) table.insert(blue, player) end end end local bluerep = blue[math.random(1, #blue)] local yellowrep = yellow[math.random(1, #yellow)] local greenrep = green[math.random(1, #green)] bluerep:MoveTo(game.Workspace.R62_Trk1.Model.VehicleSeat.Position) yellowrep:MoveTo(game.Workspace.R62_Trk3.Model.VehicleSeat.Position) greenrep:MoveTo(game.Workspace.R62_Trk4.Model.VehicleSeat.Position) end