Advertisement
otorp2

roblox gravity and mass

Aug 13th, 2018
579
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. 1
  2.  
  3. Answered by TurboFusion 1671 Moderation Voter 3 years ago
  4. First off, you need a BodyForce. Put that into the brick, and then edit the force so that X and Z are both 0, but Y is the number you need to counteract the gravity of the brick.
  5.  
  6. ROBLOX's gravity is about 196.2 studs/second^2. Just like Earth's gravity is 9.81 meters/second^2
  7.  
  8.  
  9.  
  10. The gravity of a brick is measured by its volume. So to find the volume of the Brick, simply multiply its Length by its Width by its Height: Part.Size.X * Part.Size.Y * Part.Size.Z
  11.  
  12. Finally, you have to counter the gravity of the brick, so you have to multiply the volume of the brick by ROBLOX's gravitational acceleration, and you get this: Part.Size.X * Part.Size.Y * Part.Size.Z * 196.2.
  13.  
  14. Once you have all that done, just put edit the BodyForce's force, like so:
  15.  
  16. view source
  17.  
  18. 1 local BodyForce = script.Parent.BodyForce
  19. 2 local Part = script.Parent
  20. 3 BodyForce.force = Vector3.new(0,Part.Size.X * Part.Size.Y * Part.Size.Z * 196.2,0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement