Help with power ups 2D game!!

Help!!

Good day.

I need your help since I have a script which belongs to a PowerUP, when the player collides with the game Power UP is enabled the script which causes the coins to go to the player, the magnet effect, but my problem is that Only the coins that are generated are those that are affected by the instruction to enable the script and the coins that were already in the scene are not affected. Attach images of the Script that I use to make the Magnet Script.

I appreciate the support in advance.

Regards!!

Please post scripts using code tags and not as an image.

Another thing is if each of the coins has this script on it, you should use something other then all those gameobject.find…slow call to do it in an update like that.

Now…I think you are saying that only coins created by another script are working and the ones you place in the scene are not? From the sounds of it, you are activating an ability, which turns on this script on the coins. But, how are you determining what coins are in your scene?