So i want to prevent this script from damaging the same humanoid twice while still being able to damage other ones, just not multiple times.
wait() script.Parent.Touched:Connect(function(hit) local h = hit.Parent:FindFirstChild("Humanoid") local dmg = 15 if h~=nil then h:TakeDamage(dmg) end end)
You should store the names of the players/npcs in a table, if you want to hurt them once, even after they reset, or, if you want to reset this when the humanoid dies, you can store an object in the humanoid when you damage it and then check its presence each time.