So I have a Lobby and Playing team and i would like the players in the Lobby team to teleport to the map and also set their team to the Playing team and vice versa when the game ends, but it doesn't seem to work and the output doesn't have any errors.
My Script:
local playersinlobby = lobbyteam:GetPlayers()
for i, v in pairs(playersinlobby) do
local Character = v.Character
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
if Character then
HumanoidRootPart.CFrame = ClonedMap.TeleportPoint.CFrame
wait(2)
v.Team = playingteam
end
end
I would like to know the reason why.
Thanks.

3 comments
It looks fine to me, does anything happen at all?
Try doing HumanoidRootPart.CFrame = CFrame.new(ClonedMap.TeleportPoint.Position)
sorry for making you wait but yes everything works except the teleporting parts i could send the whole script if needed