It's supposed to do damage when an enemy touches"hs" or "hss"
hs.Touched:connect(function(dmg) -- if you touch this hss.Touched:connect(function(dmg)-- or this it does 10 damage but it no do that :c if dmg.Parent:FindFirstChild("Humanoid")~= nil then if dmg.Parent.Name ~= plr.Name then dmg.Parent.Humanoid:TakeDamage(10) hs:Remove() hss:Remove() end end end) end)
You need to define hs and hss. That is also called making a variable
Example:
Baseplate = game.Workspace.Baseplate
For more info on variable visit
http://wiki.roblox.com/index.php?title=Variable
Well, assuming that all the variables are not nil (are defined) then this should work perfectly fine. I'm not 100% sure why your original script did not work, but I have an idea. Oh well, try this:
hs.Touched:connect(function(dmg) -- if you touch this if dmg.Parent:FindFirstChild("Humanoid")~= nil then dmg.Parent.Humanoid:TakeDamage(10) hs:Remove() hss:Remove() end end) hss.Touched:connect(function(dmg) if dmg.Parent:FindFirstChild("Humanoid")~= nil then dmg.Parent.Humanoid:TakeDamage(10) hs:Remove() hss:Remove() end end)
Oh and please, could you use code indentation next time for making it easier for people to read your script (I hope this doesn't sound like I'm acting aggressive towards you)? Thank you.