Here is the script:
script.Parent.Touched:connect(function(Part)
if Part.Parent ~= "SmallShip" or "Cannon" or "Barrel" then
if Part.Name == "CannonBall" or "Explosion" then
script.Parent.Health.Value = script.Parent.Health.Value - 1
print('Ship took damage!')
end
end
if script.Parent.Health <= 0 then
script.Parent.Parent.Weld:Remove()
print('Ship destroyed!')
end
end)
For some reason it is printing the ship took damage when anything touches it, how do I fix this?

2 comments
on line three, are you checking if it is not those parts or it is? seems like you want them to touch it.
What he said. We cant troubleshoot an issue if we dont know what you want, especially if you dont even know what you want.