Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

BodyVelocity DOESN'T ignore gravity, like the wiki says?

BodyVelocity's Wiki Page

BodyVelocity is used to set a constant velocity. This means that it can be used to move your part at a constant speed despite gravity.

Am I missing something here? When I utilize it on my non-CanCollide part, it falls just like normal. Is the wiki incorrect?

local cp1 = script.Parent
cp1.Touched:connect(function(hit)
	if hit.Name == "Enemy" then
		hit.BodyVelocity.Velocity = Vector3.new(-10, 196.2 * hit:GetMass(), 5)
	end
end)

If I don't apply the part's mass * 196.2 to the Y, it falls.

1 comment

0

I think you also have to set the MaxForce of the BodyVelocity in order for the velocity to work. I'm sure the MaxForce is set to 0 on all axis by default.

1 answer

✓ Accepted answer

I'm sorry I don't have an explanation for you, but I do have an example of how mine is set up. Mine works as intented.

velo.velocity = B.CFrame.lookVector * 120
velo.maxForce = Vector3.new(math.huge, math.huge, math.huge)

This discussion is preserved as it was. New answers, comments, and votes are closed.