Error Unable to cast Instance to int64

I made a screen where you can buy products for in game currency. However, when I press the buy button it does not prompt a product purchase, but instead an error comes up. The error is “Unable to cast Instance to int64”. I do not understand what this means, and I couldn’t find any other help on other posts.
The thing is that it was working before I made changes to a whole different script. Look at the following Images:

image
The script where the error occurred (Highlighted line is where the error took me).


The script that I changed to make the error occurr.

There probably is a way to make the second script better but that’s not what I’m looking for.

Did you mean script.Parent.ProductID.Value, by any chance? You can swap out ProductID with ProductID.Value if I assume that thing is a NumberValue.

1 Like

oh my gosh im dumb thanks so much

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