Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to use BodyForces to remove gravity from a part?

Asked by 4 years ago

I've been using Roblox to simulate some of the stuff I've learnt in Physics class. But for the life of me I'm not able to 'remove gravity' (degravitise? I don't know the word) from a part. I've tried doing:

local Part = Instance.new("Part", workspace)
Part.Size = Vector3.new(0.05, 0.05, 0.05) -- very small
Part.CanCollide = false
local bf = Instance.new("BodyForce", Part)
bf.Force = Vector3.new(0, Part:GetMass() * 196.2, 0)

But this just accelerates the part extremely fast upwards. If I replace the Y force with any other value it either accelerates upwards or just falls flat.

Is there any other way to degravitise parts?

0
Depending on your use cas you can remove gravity from the game itself https://developer.roblox.com/en-us/api-reference/property/Workspace/Gravity User#5423 17 — 4y
0
I can do that, yeah. I'd also like to know what other ways to remove gravity. radiant_Light203 1166 — 4y
0
You should parent last. It could be being pushed from being placed at the origin of the world. hiimgoodpack 2009 — 4y
0
There's no baseplate, so that shouldn't do anything. radiant_Light203 1166 — 4y
0
Just try it hiimgoodpack 2009 — 4y

Answer this question