of     1   

Whoonu
#36749105Tuesday, November 09, 2010 4:15 AM GMT

I need a script that I can put in a gun that will make it only kill a zombie. Also, if anyone knows about any great GUI's don't hesitate to tell me about them. My place is here: http://www.roblox.com/Tower-wars-Please-read-description-item?id=16212091. Please visit it and tell me any ideas you have with it! Thanks!
Rushour3
#36749825Tuesday, November 09, 2010 4:44 AM GMT

Sorry, no requests. But, if you need help learning how to script, go to wiki.roblox.com
SilverRaptor
#36751584Tuesday, November 09, 2010 6:37 AM GMT

Actually this could be very easy. Put this in the script for the bullet: function onTouched(hit) if hit.Parent == Workspace.Zombie then --killing stuff end end script.Parent.Touched:connect(onTouched) You want your zombies to be in Workspace, as shown.
Whoonu
#36755515Tuesday, November 09, 2010 3:07 PM GMT

Thanks guys!
BloxBuilder900
#36757900Tuesday, November 09, 2010 5:29 PM GMT

Silver, that would actually work for one zombie only. If you're using a zombie from free models... They have an Humanoid called Zombie. Otherwise you should check the Humanoid parent's name (Hunanoid.Parent.Name).. If it's"zombiename" then the humanoid receives damage. Otherwise whatever else you want.
07lchris
#36760548Tuesday, November 09, 2010 7:18 PM GMT

script.Parent.Touched:connect(function(hit) if (hit.Parent:findFirstChild("Humanoid") ~= nil) then hit.Parent.Humanoid.Health = 0 elseif (hit.Parent:findFirstChild("Humanoid") == nil) then return end end) This would be the bullet script. All you would have to do is splice this into a gun of your choice. This would kill all zombies, and humans I guess, does this matter? Is it does, this would kill only zombies: script.Parent.Touched:connect(function(hit) if (hit.Parent:findFirstChild("Humanoid") ~= nil) and (hit.Parent.Name == "Zombie") then hit.Parent.Humanoid.Health = 0 else return end end)

    of     1