Hi, I'm having troubles with the NPC's in my game. I want the NPC's to give me coins throughout a level and have one NPC at the end to take my coins to unlock the second level. How do I do that?

I’m making an app for school and i can’t figure out how to get an NPC to give/receive coins, any help?

tis just a basic interact event. basically you just make a script where when you go up to a npc and press a input the npc gets the player character, then casts the player to the class of the player, then gets a coins variable in the character and either adds or subtracts to/from the variable.

on the one that takes coins you will need to switch the add for a subtract and add a little check to the script to be sure that the player has enough coins before taking them.