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 change the gravity in my game?

I have been wanting to mess around with ROBLOX gravity which I know only pushes down and no other forces, however how could I add/disable other forces like the X,Y and Z. I know that I need BodyForce but whenever I try just BodyForce it does not work. Any help?

2 comments

0

You sure you did not use enough force to cause a change in its position?

0

Oh nice I did not know about the new update with the property Gravity, Thank you so much for the help!

1 answer

✓ Accepted answer

A new update was released to manipulate gravity. If you go to Workspace, you'll see a property called Gravity with a value of 196.2. This value is the force acted upon all parts in the game. If you were to say, set this to 0, Gravity would cease to exist causing everything to be still unless another force pushes the part, making it keep the same movement forever until a new force.

Now the above solution will work on EVERYTHING and not a single part. If you want to use BodyForce on a single object to nullify gravity, you'd use the bellow code.

BodyForce.Force = Vector3.new(0, 196.2, 0) * Part:GetMass()

The above code assumes BodyForce is INSIDE of Part which is a variable of an actual object.

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