So I have this problem when people with bad connection or something try to be teleport somewhere else which causes the whole game script to die is there a way I could skip the person aka not teleport them if their body part isn’t found in time?
for i,v in pairs(game.Players:GetChildren())do
if v.TeamColor == BrickColor.new("Bright red") and v.TeamColor == BrickColor.new("Bright blue") then
local spawns = mapstorage["Map"..MapNum]:WaitForChild('Spawns'):GetChildren()
local spawne = math.random(1, #spawns)
local randomspawn = spawns[spawne]
wait(1)
if v.Character == nil then
v.Character:WaitForChild("UpperTorso").CFrame = CFrame.new(randomspawn.Position + Vector3.new(0,2,0))
else
v.Character:WaitForChild("UpperTorso").CFrame = CFrame.new(randomspawn.Position + Vector3.new(0,2,0))
end
end
end
end