Hi, I have this damage script I made and it works, but it also damages my self.
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid")~= nil then
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - 25
script.Parent:remove()
end
end)
How would I go about fixing this issue? Any help would be appreciated. -A newbie Scripter

3 comments
Stop using deprecated methods. it’s script.Parent:Destroy() and :Connect(), not :connect
They both work
@incap it really dont matter it works either way.