I want to create something like this, where the parts go up and down when you hit the floor. But I don’t know what velocity is useable for this. Clip:
I want to create something like this, where the parts go up and down when you hit the floor. But I don’t know what velocity is useable for this. Clip:
1 Like
I think it might be Y of AssemblyLinearVelocity, im not too familiar with velocity. I think it sets the velocity to that for a moment then sets it back to 0, it has a radius that makes them bounce i guess…
Since you want the object to go out and away, you could get the unit vector (so (part.Position - hrp.Position).Unit) and then changing the Y value to something positive. This would look something like this:
-- Assume part is the part you wanna fling and hrp is humanoidrootpart of player
local fling = (part.Position - hrp.Position).Unit -- Get Unit
fling *= Vector3.new(1,0,1) -- Clear y value of unit
fling += Vector3.new(0,5,0) -- You can change 5 to be something larger for a greater effect
fling *= 10 -- Again you can adjust this to increase the effect
part.AssemblyLinearVelocity = fling -- Fling the object
i think its apply impulse. directly changing assembly linear velocity affects its current velocity.
True, but it is already on the ground, so I don’t think it will make much of a difference.
apply impulse still looks like a better pick since its a built in method.