Loosing my mind, AssemblyLinearVelocity will not change existing workspace part's assemblylinearvelocity

Hello,
I have been banging my head for hours trying to do something simple, and have searched here , google, roblox api etc.

I want to be able to change via a script a parts assemblylinearvelocity. Should be simple. As the easiest test, I created a part in the workspace and a script under it with

part = script.Parent

part.AssemblyLinearVelocity = Vector3.new(0, 0, -10)

The part’s properties are set to 0, 0, 0 .

When I run it in studio it stays at 0,0,0. Note I do not want to create a new part, I want to change an existing part , so that I can change it to different values depending on things. But all I am trying to do now is just get it to change to 0,0,-10 …

Thanks, I am loosing my mind…

2 Likes

I think it has to be anchored to keep its velocity.

umm so I can not have it anchored because it is (or will be , a moving part , part of a model)…

I was also searching the basepart impulse which might work for what I want, but have not found an good examples on that code.

(Edit, I tested it as anchored and yes it does then work, but will not work for what I really want, but will mark it as a solution since that is what the issue is… thanks for replying)…

1 Like

also while in studio and play, I can change it via manually, and it takes the value and works , and is not anchored … but maybe to set it via a script it has to be anchored , which is not really going to work…

Basically I want a force to be applied …so that the player near it will be moved , but the part is also going to be moving all the time…

Also it will be weld constrained to part of the model

Right now I was just trying to see why it is not working in a simple way…

1 Like

Instead of directly setting a parts velocity, use BasePart:ApplyImpulse(Vector3)

Do consider the amount of force you’re putting behind it too. Depending on the mass of your part, 10 units may not be strong enough.

Cool, thanks I will try it out!

Let me know if you got a model that works!