Help on a skip stage that don't work

Im trying to make a skip stage but it doesn’t work.

The skip stage only works in studio and not in game while everything seems good in the output

This is my script:

MarketplaceService = Game:GetService("MarketplaceService")

MarketplaceService.ProcessReceipt = function(receiptInfo)
players = game.Players:GetPlayers()

currency = "Stage"

done = 0

for i=1,#players do
	if players[i].userId == receiptInfo.PlayerId then
		if receiptInfo.ProductId == 998113221  and done == 0 then
			done = 1
			players[i].leaderstats[currency].Value = players[i].leaderstats[currency].Value + 1
			players[i].Character.Humanoid.Health = 0
			done = 0
		end
	end
end
return Enum.ProductPurchaseDecision.PurchaseGranted	
end

Its in workspace and my other script is a local script to buy the dev product
Thanks for reading and hop you can help :slight_smile:

1 Like

I see the problem. Instead of doing:

you have to do this (you forgot about “” characters in [] brackets):

players[i].leaderstats[“currency”].Value = players[i].leaderstats[“currency”].Value + 1

Oh well thanks you then! 30 chars

Mark this as a Solution and give it a :heart: if you want! @SpeedRunJumpRoblox