Help with simple script please

trying to get the parent of the touched part other (a tool in the character) but dont know how to and other.parent is nil

local part = script.Parent  
 

local function onPartTouched(other)
	if other.Name == "DirtPart" then
		other:Destroy()
		print(other.Parent)
	end
end
part.Touched:Connect(onPartTouched)

can you explain more what are you trying to do? are you getting any errors in the output?

Print other.Parent and then destroy other

I didn’t understand the whole problem, but other.Parent is supposed to be nil because you destroyed it

lol i did such a noob mistake thanks

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.