for example
part.Touched:connect(function(part)
part.Anchored=true
end)
part.TouchedLeft:Connect(function(part)
part.Anchored = false
end)
is there a way to do this?
when a something touches a part it gets anchored and when it stopped touching it gets unanchored

1 comment
it is possible but will be buggy due to lag and physics. Your current code anchores the part that is hitting not the part which has the event. This is down to the scope of the variable part.