if plr.TeamColor == "Bright blue" then plr.Character.Torso.CFrame = CFrame.new(205, 17.4, -74.8) elseif plr.TeamColor == "Bright red" then plr.Character.Torso.CFrame = CFrame.new(-362.4, 17.4, 78.2) end
It runs it just fine, no errors, but it doesn't teleport the player in the map, but it thinks it has. How do i fix this?
First, make sure that 'plr' is defined.
Second, you're comparing the TeamColor to a string. Here's how you should do it:
if plr.TeamColor == BrickColor.new("Bright blue") then plr.Character.Torso.CFrame = CFrame.new(205, 17.4, -74.8) elseif plr.TeamColor == BrickColor.new("Bright red") then plr.Character.Torso.CFrame = CFrame.new(-362.4, 17.4, 78.2) end
if plr.TeamColor == BrickColor.new("Bright blue") then plr.Character:MoveTo(Vector3.new(205,17.4, -74.8)) elseif plr.TeamColor == BrickColor.new("Bright red") then plr.Character:MoveTo(Vector3.new(-362.4, 17.4, 78.4)) end