ProcessReceipt script not working

Please never suggest using PromptProductPurchaseFinished to handle a product purchase, it does not have the same capacity to process a product purchase as ProcessReceipt does. This is explicitly highlighted on the API page.

ProcessReceipt is the correct thing to use here. It is a definable property of MarketplaceService and therefore needs to be defined. It is not a signal and therefore cannot be connected to. You can read more at ProcessReceipt and Developer Products – In-Experience Purchases.

OP was on the right track with their original code but their FireClient code was incorrect. They just need to fire with the actual client object (which they already defined) and it would probably work assuming the remote also has a LocalScript consuming the invocation.

Replicated.HINTS.Level1:FireClient(player)

Same original code with just this change. The LocalScript can consume the invocation via OnClientEvent. Remember to check the console for errors if code doesn’t work and include them in threads to give context and help pinpoint what exactly the problem is.

Error “Argument 1 missing or nil”

game.ReplicatedStorage.HINTS.Level1.OnServerEvent:Connect(function(player)
	Objective.Text = " - Go Upstaris."
end)

error “FireClient can only be called from the server”

In the LocalScript, use FireServer instead of FireClient.

they are both local scripts…

Error “OnServerEvent can only be used on the server”

On the handle, make sure using Script. If your trying the make it both in LocalScript, why don’t you change the text right after instead of using RemoteEvent? Using RemoteEvent is not recommended if your trying to change both in Local Script.

so I should change the, to be server?


game.ReplicatedStorage.HINTS.Level1.OnServerEvent:Connect(function(player)
	Objective.Text = " - Go Upstaris."
end)```

In GUI, you should use LocalScript. So instead of firing, you can change it right after someone purchased. Do it inside LocalScript.

1 Like