So I want to create a gun that only kill zombies so I took a free model (checked it and it has no viruses) and edited it so the damage will happen if the bullet hits the "Zombie." It started working for a while until It started giving me the "error attempt to compare number and userdata" and it wouldn't damage the zombie. This is the line where the error happened :
elseif eHumanoid and eHumanoid ~= humanoid and eHumanoid.Health > 0 and hit ~= projectile then
(Sorry I'm new to this website so I don't know how to put the script in the script box or whatever it's called"
(edit: I don't know why but it is working now. I still need help because the error is still happening and sometimes this happens.)