Why are we pressing buttons in the NPC? I though it was the player doing the stealing.
I feel you’re not approaching it correctly.
- the NPC has the coins
- the player approaches the NPC and the player presses the button
- we run a function in the NPC, we get the NPC’s coins
You have your NPC right here:
Implement the stealing functionality there.