BasePart:ApplyImpulse waits until part is in workspace.

If ApplyImpulse is called before, but not after, setting the part’s parent to nil, it will wait to apply the impulse until the end of the frame where it gets reparented, even if many frames have passed or AssemblyLinearVelocity was set since then.

Repro place showing a part jumping long after ApplyImpulse was called:
ApplyImpulse_ambush.rbxl (55.2 KB)

On the other hand, if ApplyImpulse is called after the part’s parent is set to nil, the impulse is never applied.
I can work around this issue fairly easily, but it’s probably worth mentioning anyway.

Expected behavior

BasePart:ApplyImpulse applies its impulse either on the line it’s called or at the end of the physics step.

1 Like

Thanks for the report. This is intended, albeit somewhat quirky, behavior.

If a part has no parent at all it’s just free-floating in memory, and won’t get any update ticks to apply forces or impulses. When we apply an impulse to a part it’s going to accumulate into a variable. This way all impulses applied to a part in a single tick will get summed onto a single variable. Once the physics tick occurs, the part (if it’s parented in the workspace) will participate in the physics tick, and the impulse variable will be used and cleared back to zero.

If you wait one tick before unparenting the box in your placefile you will see the impulse become applied. Otherwise, it will naturally just sit in memory with the accumulated impulse waiting until the first time it participates in a physics tick.

1 Like