Hello,
So I was working on a “backpack shop” similar to multiple simulators but I am running into a bit of an issue and I don’t know what is the issue since there no error in the output.
Are you printing warnings as well? That’s strange because in your code, you print a warning whenever the player invokes the remote, and that warning is not showing up on the console.
Thanks. Yep, that confirms the error is on the client side, since the remote is invoked several times when you only clicked the button once.
Can you please show us the client-sided code? (The code that manages the UI)
Ah, I see the problem. Inside every iteration of the loop
for i, BP in pairs(BackpackData) do
you are connecting the MouseButton1Click event to the BuyButton, which creates multiple connections to the button. What you really want to do is keep track of which backpack the player is currently focused on, so you only need to connect a single clicked event to BuyButton.