So I’m making a basic, comedy FPS game and I am trying to make the bullet shots. So basically the position of the pointer is where the bullet is shot at, but I need to detect if the parent of the object that was shot is a player, so I can substract health.
I tried searching trough the dev forum to help me with this, and I didn’t find anything useful. If there’s a topic that has the same question, please tell me!
Edit: I’m having problems with loading studio, so I cannot put in the code. Apologies!
1 Like
Since I’m not a scripter myself here’s what I know: you need to object/player to have a hitbox, then it needs to have the health thing too, probably make the gun or whatever work first adding it so when shot it substracts x amount of damage, then it should work on health.
Even if you’re not a scripter, you actually helped me! Thank you, now I can proceed with my game
1 Like
I’m glad to be able to help someone! I hope your game does well, message me when it releases and I’ll be there. If you need help with it too, I can.
Do I private message you for help btw?
Click on a profile then it should be an option somewhere on the screen, not entirely sure myself.
You’ll want to use the Touched event and make an if statement that checks if touchedPart.Parent.Humanoid ~= nil. Read up on the documentation for further information.