script.Parent.Touched:connect(function(part)
if part.Parent.Dirt == nil then
print("It's working")
end
end)
Okay, according to the code, or at least what I think should happen, is that if the object "Dirt" does not exist in the parent of part, then it should print "It's working". But umm, yeah it doesn't do that, it just errors "Dirt is not a valid member of Model" and doesn't do anything inside the if statement. If you guys could maybe help me find a way to word it better or point out my errors then thank you.

4 comments
Thanks, makes sense.
Thanks, can you accept the answer so people know that this has been answered and they don't have to bother with it.
findFirstChild is deprecated. Use FindFirstChild.
Yea, mb. I switched over and over.