So I need a function for a sentry gun I’m working on that when i get close to it it will start shooting at me, and i can shoot at it and it will take damage. Right now I’m using a collision sphere for when i get close to it, but when I shoot at it it is taking away its health when it enters the collision sphere rather than when it hits the mesh.
What do i need to do to make these functions separate?