idk how to do it can i please have some help??? like damage only Zombie and not humanoid oh and Zombie is the name of the humanoid
COMMUNITY QUESTION
im makeing a gun and i want it to damage only some humanoids?
1 answer
If I understand correctly, you only want humanoids with the name of Zombie to take damage from a gun. In the gun, you should look through the script and find the function that contains a line that says
Humanoid:TakeDamage(number)
or
Humanoid.Health = Humanoid.Health - number
you should add an if statement to check if the humanoid's name is Zombie -
if Humanoid.Name == "Zombie" then
And if the name is Zombie then it will trigger the function to damage the zombie. If you need any more help just ask!
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
sorry im new to codeing with roblox
You can take the paintball gun, or some other free model gun that has a shooting script. Then add a check in there where it deals damage, to check if the humanoid isn't in the character of a player.