script.Parent.Touched:Connect(function(WhoTouched)
if game.Players:GetPlayerFromCharacter(WhoTouched.Parent) then -- Checking if any member of the player's character touched the part and taking the player from that member
script.Parent.Anchored = false -- Anchored to false
end
end)
Your code should unanchor the part, but keep in mind that it will unanchor the part after it’s been hit by the moving player/object. There will be no transfer of momentum because the part was technically still anchored when it was hit. If you want the object to move in response to the collision, you either need to unanchor it before the collision, or you need to apply the force yourself.