Removing the AssemblyLinearVelocity of an assembly

I want to anchor a cart, teleport it to a certain spot and then unanchor it. Once unanchored the cart should stand still. However, when the cart had an AssemblyLinearVelocity other than zero before teleporting, once it gets unanchored it flings away.

This is my code:

local base = cart.Base::BasePart
base.Anchored = true
cart:SetPrimaryPartCFrame(cf)
--base:ApplyImpluse(-base.AssemblyLinearVelocity*base.AssemblyMass)
--base:ApplyAngularImpulse(-base.AssemblyAngularVelocity*base.AssemblyMass)
task.wait(2)
base.Anchored = false
base:SetNetworkOwner(player)

The commented lines are a proposed solution I found in a different thread, however when I tried it out it would just fling away the cart even more.
Any ideas are appreciated, thanks

I can’t check on studio now, but maybe try setting .AssemblyAngularVelocity and .AssemblyLinearVelocity to Vector3.new() for all of the parts, or maybe just one of them if roblox handles them as an assmbly properly

1 Like

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