Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1
- Answered by TurboFusion 1671 Moderation Voter 3 years ago
- 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.
- ROBLOX's gravity is about 196.2 studs/second^2. Just like Earth's gravity is 9.81 meters/second^2
- 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
- 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.
- Once you have all that done, just put edit the BodyForce's force, like so:
- view source
- 1 local BodyForce = script.Parent.BodyForce
- 2 local Part = script.Parent
- 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