Is there a way to make this better or cleaner? I feel like there’s a more efficient way to do this but I can’t figure out how I’d go about it.
I tried putting it all in one loop, but the countdown wouldn’t be the same for everyone if it is looping through multiple people
for _, plr in Runners do
if plr.Character and plr.Character:FindFirstChild("HumanoidRootPart") then
plr.Character.HumanoidRootPart.CFrame = Teleports.Course_Spawns:GetChildren()[math.random(1, #Teleports.Course_Spawns:GetChildren())].CFrame
end
end
for _, plr in Runners do
if plr.Character and plr.Character:FindFirstChild("HumanoidRootPart") then
plr.Character.Humanoid.WalkSpeed = 0
end
end
-- // countdown
wait(3)
for _, plr in Runners do
if plr.Character and plr.Character:FindFirstChild("HumanoidRootPart") then
plr.Character.Humanoid.WalkSpeed = 16
end
end