I'm trying to make a team changing menu thingy, but when I try to change the team colour, it says
18:09:23.069 - ServerScriptService.ChangeTeam:6: bad argument #1 to 'new' (Color3 expected, got BrickColor)
So I thought "Alright, a bit odd. But I'll change it to a Color3. After all, that's what the error said to." I change it, and when I run it, it has the audacity to print
18:12:26.480 - ServerScriptService.ChangeTeam:6: bad argument #3 to 'TeamColor' (BrickColor expected, got Color3)
Also, the print I put printed out a string value. AKA the BrickColor value.
Here's the code. This has stumped me..
local MMS = game:GetService("MarketplaceService")
game.ReplicatedStorage.ChangeTeam.OnServerEvent:Connect(function(plr, teamColor, free, passID)
print(teamColor)
if free then
plr.TeamColor = Color3.new(teamColor) -- you can also say BrickColor.new(teamColor)
plr:LoadCharacter()
elseif not free then -- ignore this and below. it's irrelevent
if MMS:UserOwnsGamePassAsync(plr.UserId, passID) then
plr.TeamColor = BrickColor.new(teamColor)
plr:LoadCharacter()
end
end
end)

2 comments
what does teamColor = to
Wha.. what do you mean?