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

Physics in Lua?

I know many people say there are physics in Lua. What does that mean? Like the physics in science? Can you provide some examples too please?

2 answers

✓ Accepted answer

Do not forget that the gravitational force is exactly 196.2.

So if you put a BodyForce object into a huge part and set the y value of the force to 196.2x whereas x equals the mass of the part, then it will stay, float.

This can or cannot be of use, that's upto you. One last thing, you can easily get the mass of a part by using the GetMass() method. Basically the mass is all size axises multiplied, which this function does for you.

Say you have a part with a size of Vector3(10, 7, 4) then the mass would be 10×7×4 = 70×4 = 280. For models with multiple parts I'd recommend to either place BodyForces in each indivudual part or to put a BodyForce in a central brick with all masses added up as the y value.

Yes, I drifted off quickly there lol.

What they mean if that with LUA, you can create many physics-simulation engines: rope physics, electrical simulations, forces system with Newton's laws, ...

1 comment

0

(PS Lua is not an acronym, it means 'moon' in portuguese.) This is mostly accurate, but you should probably mention that 'they' could also be reffering to ROBLOX's physics engine, and the Body* objects that allow for distortions within the system without having to use scripting.

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