I made a code which would teleport the players in their respective spawns (which are just parts with the SpawnLocation decal to decrease suspicion) when the round starts and the code looks like this:
local function TeleportAPlayer(player)
if player.Team == "Red Team" then
game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(61, 1, -11078))
end
if player.Team == "Green Team" then
game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(-61, 1, -11077))
end
if player.Team == "Blue Team" then
game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(61, 1, -11199))
end
if player.Team == "Yellow Team" then
game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(-61, 1, -11199))
end
end
What can I use instead of player.Team (because it is only a server-side script)?

1 comment
oops, forgot, use .Name after the Team since you're using a string