I have 3 different humanoids I want to take damage from my weapons, Humanoid, Enemy, and Marine. I cant get them all to take damage only one at a time. How can I make a weapon damage all of them at once?
✓ ANSWER ACCEPTED
How can I make a sword or weapon deal damage to multiple Humanoid names?
1 answer
✓ Accepted answer
You could use the FindFirstChildOfClass function to get any Humanoid, reguardless of their name.
example;
script.Parent.Touched:Connect(function(hit)
local h = hit.Parent:FindFirstChildOfClass("Humanoid");
if h then
h:TakeDamage(20);
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Thanks man thats exactly what i'm looking for! ill try put it in a sword.
Worked right away!