Change player's team upon developer product purchase

Didn’t seem to do the trick, still nothing in the dev console either.

Hey. I modified your code a bit. Try this:

game.MarketplaceService.ProcessReceipt = function(TABLE)
	if TABLE.ProductId == 0000 then
		local p = game.Players:GetPlayerByUserId(TABLE.PlayerId)
		if p then
			p.TeamColor = BrickColor.new("Bright yellow")
			p:LoadCharacter()
			return Enum.ProductPurchaseDecision.PurchaseGranted
		end
	end
	return Enum.ProductPurchaseDecision.NotProcessedYet
end
2 Likes

Good concept, This will work 100% Percent.

1 Like

Awesome, that seemed to do it. Huge thanks to both you and Gio.

2 Likes