local gameSpawn = game.Workspace.gameSpawn
local lobbySpawn = game.Workspace.Lobby.lobbySpawn.lobbySpawn
local minimumGameSpawn = 1
local minimumLobbySpawn = 4
function teleportPlayers(target)
for _, player in pairs(game.Players:GetChildren()) do
local character = player.Character
local torso = character.Torso
torso.CFrame = target.CFrame
end
end
wait(5)
print("Racers To Your Karts")
wait(2)
teleportPlayers(gameSpawn)
Also its fine when i test this by myself in solo mode or play mode but when i test this in test mode from the clients and servers area to where you can test with multiple people you can control with different windows, IT DOESNT teleport them. Please help

4 comments
Please explain ipairs and pcall sorry im a bit of an amateur to programming but i study everyday
theres also an error in the equal sign im tryign to fix it but idk whats causign the error
Just hopped on my computer, gonna edit my answer soon
Edited and tested my answer, works just fine.