Cash DevProduct Not Working!

2021-12-11 (2)

So in my tycoon, I made a shop where people can purchase cash (e.g. 10000 in game cash for 100 R$)

The script is supposed to add 2000 cash to the player if the purchase is successful. However after test purchase was done, no cash was added to my stats.

The script seems fine, so what could be an issue here?
It also doesn’t pop up any errors on the console.

1 Like

Are there any errors to the code? What does this code even do?

1 Like

No there are no errors whatsoever

1 Like

It could be that you already have the product outlined in productid

1 Like

no thats normal nothing wrong with the id part

What is cashmoney.Value? Is it an int value?

1 Like

Its just a value for the cash yeah you can call it int value i guess

Do you by any chance have more than one script that sets ProcessReceipt? ProcessReceipt can only be defined once and the most recent assignment will be used with others dropped. If you’ve debugged this and it’s not getting called (no errors or prints aren’t getting sent) then it’s most likely this. Only one script should ever be setting ProcessReceipt.

2 Likes

no…I dont have second script for the same thing

Could you provide more context then? What debugging strategies have you tried so far and what were the results when you debugged? Not getting any errors isn’t enough to find out why this isn’t working and we can’t do much but speculate with the little code you’ve provided.

Ref: Debugging Tools

2 Likes

1 Like