local shooter = game.Players.LocalPlayer.Name
PreDefinedPart.Touched:connect(function(sod)
if sod.Parent ~= nil and sod.Parent.Name ~= shooter or sod.Parent.Parent ~= nil and sod.Parent.Parent.Name ~= shooter then
print(sod.Parent.Name.." "..shooter)
end
end)
This is a localscript inside an arrow which has just been shot out of a bow, it's supposed to check to make sure it doesn't hit part of the bow it was shot out of or a body part of the player who shot, then proceed with the script. For some reason, it's bypassing the 'if' and acting like the names are different, then it prints out this: "Player1 Player1", meaning it hit itself, and went past the 'if'. Why is it doing this?

1 comment
For some reason, the part doesn't even have a TouchInterest in it, what I'm doing is copying the 'arrow', copying this Kill script, putting it into the arrow clone, then putting the arrow into the world and shooting it.