Hello!
I have tried many scripts (including my own) to make the enemy lose health. I have a First person controller against a cube that chases me but doesn’t lose health. I use a sword, not a gun, that swings perfectly. Any help? Thanks in advance!
Hello!
I have tried many scripts (including my own) to make the enemy lose health. I have a First person controller against a cube that chases me but doesn’t lose health. I use a sword, not a gun, that swings perfectly. Any help? Thanks in advance!
maybe use colliders to detect when the sword hits your enemy. then just have the script on the enemy - 5 off its health every time the collision happens. make sure to use if(collision.tag = “sword”) so he doesnt lose health when he collides with the floor.