See, what I'm trying to do is have a block be swung like a sword, and check if it's already hit that person to prevent from dealing mass amounts of damage.
Here is the basic script, without dealing any damage.
sword = script.Parent
mainpart = sword.Blade
hitplayers = {}
mainpart.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and (hit.Parent.Name[hitplayers]) == nil then
table.insert(hitplayers, hit.parent.Name)
end
end)
Any ideas?

1 comment
I think that works, thanks