Unanchor Part When no Longer Touching Baseplate

How do I unanchor a Part when it is no longer touching the baseplate? I have this code so far and it isn’t working.

local baseplate=script.Parent

baseplate.TouchEnded:Connect(function(otherPart)
if otherPart.Name=="Part"then
otherPart.Anchored=false
end
end)

This should work

local baseplate=script.Parent

baseplate.TouchEnded:Connect(function(otherPart)
	local Part = otherPart.Parent:FindFirstChild("Part")
	if Part ~= nil then
		Part.Anchored = false
	end
end)
1 Like

It would be better if you could give us more information about what you are trying to achieve and using what method because as per your script I’m assuming your part is initially Anchored and already touching the baseplate, the script will not fire TouchEnded event unless your Part is Unanchored at a height so that it could bounce on the Baseplate to trigger the event.

Would there be a way to trigger the event without having to make the parts fall on the Baseplate?