I am create a script takedamage but I don’t know if this is the best way. Can you show me the best way?
This is my script
Local object ={}
sword.Touched:connect(function(hit)
local fhum = hit.Parent:Findfirstchild(“humanoid”)
If fhum ~= nil then
If table.find(object,fhum.Name) == nil then–find name player
Take damage
Table.insert(object,fhum.Name)
End
End
End)