Problem with function firing more than once


This function should show the player a devproduct by prompting a purchase but when I buy it the script works and shows all the correct information, but it fires 2-3 times. This is frustrating since I am trying to make a leaderboard so if this doesn’t work the leaderboard will also not work. Down the bottom you can see the script printing “Purchased” 3 time in 0.001 seconds and only 2 times on the other print. Keep in mind I only purchased it twice. If anyone could help me that would be great!

Move the PromptProductPurchaseFinished definition outside of your MouseButton1Down event definition.

Each time the mouse button click event fires, a new event callback (function) gets bound to the one that listens to product purchases. You only need one function binding for this. (a single function that gets called when ever a product prompt is finalized)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.