"blue is not a valid member of Teams "Teams" " Why isn't my random team sorter working correctly?

So i’m trying to make a team sorter, that sorts each player to a random team that doesn’t already have someone in it. My code is as follows:

 local PlayerService = game:GetService("Players")
PlayerService.PlayerAdded:Connect(function(Player)
	local RandomNumber = math.random(1,4)
	if RandomNumber == 1 then
		local playersOnTeam = game:GetService("Teams")["blue"]:GetPlayers()
		local numberPlayersOnTeam = #playersOnTeam
		if numberPlayersOnTeam == 0 then
			Player.Team = "blue"
		end
	end
	if RandomNumber == 2 then
		local playersOnTeam = game:GetService("Teams")["red"]:GetPlayers()
		local numberPlayersOnTeam = #playersOnTeam
		if numberPlayersOnTeam == 0 then
			Player.Team = "red"
		end
	end
	if RandomNumber == 3 then
		local playersOnTeam = game:GetService("Teams")["green"]:GetPlayers()
		local numberPlayersOnTeam = #playersOnTeam
		if numberPlayersOnTeam == 0 then
			Player.Team = "green"
			
		end
	end
	if RandomNumber == 4 then
		local playersOnTeam = game:GetService("Teams")["blue"]:GetPlayers()
		local numberPlayersOnTeam = #playersOnTeam
		if numberPlayersOnTeam == 0 then
			Player.Team = "yellow"
		end
	end
end)

However, I get the error:

blue is not a valid member of Teams "Teams"

how is this happening, and how can I fix it?

There’s nothing inside the Teams Service that’s called a “blue” Team, you can add one using the “Insert Object” button

Maybe it is Team.Name? Try to check for this

Oh wait, I just realized I inserted the teams object in my other roblox tab, in another game…