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

How Would I Make a Projectile Ignore Gravity?

I am currently working on a tool that fires an unanchored part outwards in the direction of a user's mouse click (using the parts velocity property). The problem is that it always arcs downwards due to gravity (despite being "Massless" which makes no sense to me). Is there a way to make the part ignore the effects of gravity regardless of the direction it is being fired?

1 answer

✓ Accepted answer

You can create a bodyforce instance and sets its Y axis force to counteract its weight.

To do this we take its mass using :GetMas() and multiply that by roblox's gravity.

BodyForce.Force=Vector3.new(0,part:GetMass()*workspace.Gravity,0)

1 comment

0

Thanks so much!

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