I am making a round based game that needs players to teleport to and from maps as rounds begin/end but this won't work.
function teleportPlayers()
local players = game.Players:GetPlayers()
for i,v in pairs(players) do
v.Character.HumanoidRootPart.CFrame = currentmap:FindFirstChild(chosenmap.Value).Spawn.CFrame
end
end
function teleportBack()
local players = game.Players:GetPlayers()
for i,v in pairs(players) do
v.Character.HumanoidRootPart.CFrame = spawner.CFrame
end
end

1 comment
you need something to activate the functions