If you want to detect if the bullet hits the player, thats a hard one to aswer…
Basicly when the player shoots I recommend doing the check on the server, BUT
here is one thing that exploiters / “Ping abusers” can do is they can shoot in front of the
enemy. If you do a client side check on the person who shot it however, On the client
you are shooting at they will be past the shooter(s) cross hair(s) (Depending on the
ping), and you will then have to fire a(n) remote event, and let the server listen to when
that even it will give the shot player damage. Another method is doing checks, on both
the Client, and the Server, then putting the bullet in between what the server sees, and
the client sees, (But hackers, exploiters can change it! If it is on the client’s memory, if
the memory path is not encrypted, the client can change what they send to the server,
including changing an(y) localscript(s).)
So, … Do the “Bullet Hit” checks on the server to be fair!
On checking wether or not the zombie hit the player, simply check: Is the zombie being
touched?, Does the parent of the object that touched the zombie have a Humanoid in
it? Is the parent a player model? Is the player not on the zombies team? Then give that
player some damage!
To check what team the zombie is on then, add a stringvalue in the zombie. Set the
stringvalue’s value to whatever team the zombie is on. Any changes made to the string
value by an exploiter / hacker will not replicate to the server or other client(s) due to
filtering enabled.
If you need more help, let me know , also: (I was in a hurry so I apologise for
any mistakes that I made while making this post)