Hello, trying to get the team changing portion of my script to work, but it’s not working and not showing anything in the output, any thoughts?
local lobbyteam = Instance.new("Team", teams)
local playingteam = Instance.new("Team", teams)
lobbyteam.Name = "Lobby"
lobbyteam.AutoAssignable = true
playingteam.Name = "Playing"
playingteam.AutoAssignable = false
lobbyteam.TeamColor = BrickColor.new("White")
playingteam.TeamColor = BrickColor.new("Maroon")
Portion of the script that is not working, runs through the code and teleports but doesn’t change teams:
function teleportplayers()
local plrs = teams.Lobby:GetPlayers()
for i,v in pairs(plrs) do
v.Character.HumanoidRootPart.CFrame = currentmap:FindFirstChild(chosenmap.Value).Spawn.CFrame
v.TeamColor = lobbyteam.TeamColor --This right here
end
end