function onTouchedNotHit(part) if part.Name == "HitboxForBackStabs" then --//Im Trying To Make It Where If A Part ISNT Named "HitboxForBackStabs" Then This Function Takes Effect, How Do I Do That? script.Parent.Parent.Parent.Head.MISSPart.BillboardGui.TextLabel.TextTransparency = 0 wait(1.5) script.Parent.Parent.Parent.Head.MISSPart.BillboardGui.TextLabel.TextTransparency = 1 print("Missed Enemy") end end script.Parent.Touched:connect(onTouchedNotHit)
Just change the ==
equals operator to a not equal to operator ~=
. This is a little bit confusing since most programming languages' not equal to operator is this !=
but in LUA it's ~=
. The end code would change line 2 to this if part.Name ~= "HitboxForBackStabs" then
.
Really hope this helped! If you have any questions just comment on this answer. If this did solve the problem please mark this as the answer. Have a good day!