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

How do I make something float with BodyVelocity?

I am working on a new game that I need a script to make it so any part with any material can float, and I need a way to change the velocity via a script. The material is different each time, meaning the gravity will be different each time.

1 answer

✓ Accepted answer

You need to get the mass of the object using the GetMass method and then multiply the mass by gravity, which is 196.2 on Roblox. Also note that you should use BodyForce and not BodyVelocity for this.

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

3 comments

0

Uh... how do you get 196.2?

0

Check out this wiki page on gravity: http://wiki.roblox.com/index.php?title=Gravity

0

Ok, thanks.

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