Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how do I make the players team color a string value?

the tycoon name is named whatever the players team color is. I'm trying to find the players tycoon from their team color. how do I make team = to "Really Red"

game.Players.PlayerAdded:connect(function(player)
	local team = player.TeamColor
	local tycoons = game.Workspace.Tycoons.Tycoons:GetChildren()
	local tycoon = tycoons:FindFirstChild(team)
end)

1 answer

✓ Accepted answer

You Could replace player.TeamColor with tostring(player.TeamColor) It Would Possibly Look Something Like This

game.Players.PlayerAdded:connect(function(player)
    local team = tostring(player.TeamColor)
    local tycoons = game.Workspace.Tycoons.Tycoons:GetChildren()
    local tycoon = tycoons:FindFirstChild(team)
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.