I'm trying to change this code so that it only hurts enemies. I've tried to fix it myself. It still fires, but doesn't hurt anyone: local hitHums = {} exp.Hit:connect(function(part) local hum = (part.Parent or game):FindFirstChild('Humanoid') if hum and not hitHums[hum] then hitHums[hum] = true -- local tag = script.creator:Clone() game.Debris:AddItem(tag, 2) tag.Parent = hum hum:TakeDamage(45) end end)
COMMUNITY QUESTION
How do change this code so that it only hurts enemies?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Please use a code block; it's difficult to read code that isn't indented.