The current balance keeps decreasing and even after collision enemies aren’t disappearing (I set hit points to 1). Box collider is added on the enemies, and the code is completely fine.
Hi Rabia,
Have you already tried to add Debug.Logs to your code to see what is going on during runtime? Maybe the code for destroying the enemies never gets executed. If that’s the case, please compare your code to Gary’s via the link in the Resources of this video. Maybe there is a little typo or something missing in your script.
See also:
- Forum User Guides : How to apply code formatting within your post
- Forum User Guides : How to mark a topic as solved
Thanks, Nina, for helping. The issue was arising due to particle settings. Now it works correctly.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.