Bodyvelocities not working

this shouldve been a pretty straightforward task but i ran into a problem i have NO idea how to fix. I am trying to apply a bodyvelocity to a part but it doesnt move at all or it just starts weirdly floating in the air


the bodyvelocities velocity is never edited past its actual creation

local test = Instance.new("BodyVelocity")
test.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
test.Velocity = script.Parent.HumanoidRootPart.CFrame.LookVector * 5 + Vector3.new(0, 10, 0)
test.Parent = workspace.test

the part isnt anchored and its mass is 56.525

1 Like
test.Velocity = script.Parent.HumanoidRootPart.CFrame.LookVector * 5 + Vector3.new(0, 10, 0)

Maybe try printing test.Velocity after this line? maybe the velocity isn’t what you expected it to be.

no changes at all
image

Well what are you trying to do with the part?
Bc that could either be a completely correct velocity or extremely wrong so I need to know.

ive been trying to make it fly towards the direction the player is facing + some added height
image

Did you check/change the BodyVelocity.P? Try changing that to a higher value and test it.

EDIT-

I don’t recommend using math.huge for body velocities usually. Doing that will make your part move with negligible downward force and when it touched a part, it’s going to fly in another direction. You can use some small values, however it’s based on the mass of an object. But you can keep it for testing purposes.

didnt really seem to change anything, even when i set it to 6000000 or math.huge

and the maxforce used is just for testing purposes

i think ive identified the issue

the bodyvelocity was created client side and applied to a part that was being replicated, so i guess what kept happening was that the replication was getting in the way of the velocity? This also applies to AssemblyLinearVelocity from what ive tested.

i found a workaround though: just cloning that part (on the client) and using the clone for the bodyvelocity

sure works now, lol