The rest of my script works and you probably do not need it.
Error: 14:57:08.831 - Workspace.Script:14: bad argument #1 to 'new' (Color3 expected, got BrickColor)
If I switch to Color3 it will say BrickColor is expected even if I add ".Color" at the end
If I use BrickColor then it will say Color3 is expected...
Players[i].TeamColor = BrickColor.new(game.Teams["Level"..Players[i].leaderstats.Level.Value].TeamColor)
If you still need the entire script then here.
MarketplaceService = game:GetService("MarketplaceService") -- Marketplace
MarketplaceService.ProcessReceipt = function(receiptInfo)
local Players = game.Players:GetPlayers()
local Level = "Level" -- string
local done = true -- bool
for i=1,#Players do
if Players[i].userId == receiptInfo.PlayerId then
if receiptInfo.ProductId == 325511816 and done == true then
done = false
Players[i].leaderstats[Level].Value = Players[i].leaderstats[Level].Value + 1
wait()
Players[i].TeamColor = BrickColor.new(game.Teams["Level "..Players[i].leaderstats.Level.Value].TeamColor) -- Not working
Players[i].Character.Humanoid.Health = 0
done = true
end
end
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
Help is appreciated

2 comments
UserId not userId
o ok