No problem.mindcontrol wrote:It work! thanks
I've forgot to mention one more thing. Because you don't assign any value to hp, it will be 0. So when projectile collides with player, hp will decrease by 1, and it will be -1. Then you go to if (hp <= 0). That condition is true now, it would be even without hp--. Player is then destroyed after first hit.