How to make farmable coins (like for example Pet Simulator X, Drone swarm simulator, etc)?

Yeah, my question is in the title.

I know the basics of how this system could work and yes I know a lot of coding in Roblox. But I can’t figure this system out. Can anybody help me?

Oh, and before I forget to say: I don’t want pets to go to the coins, chests, etc, but just only the player.

Thanks in advance!

Use the Touched event to know if a player has touched the coin and then give the coin you know.

Well, I don’t want the players to just touch the coin and then give the coin.

I want it so that more than one can ‘attach’ them self to the part and do damage to the part. Then once the health of the part has dropped down to 0, then give everyone coins.

You can give the coin a humanoid there you have health and can deal damage. Otherwise you can make a health attribute on the coin.

Well, you would have your own attack system since we can’t provide that for you. As for the coins you would scatter the coins around and connect a RenderredStepped on the client and loop through all the coins and check the magnitude from the coin to the player and if it’s in an acceptable range then tween the coin towards the player.