Getting moment of inertia; attempted workaround using sussy function causes sussier error

  1. What do you want to achieve? Constrain several assemblies (which have different y rotations) to have the same rotation on the X axis without magically spawning in mechanical energy

  2. What is the issue? In order to avoid breaking the laws of physics, we must know how difficult each of these assemblies are to rotate on the X axis to avoid ex. having something really light spin really fast, causing heavier connected things to spin unrealistically easy.

I couldn’t find any way to get the moment of inertia (I think that’s what it’s called based on some ChatGPT) directly, but I did find this completely undocumented AngularAccelerationToTorque function which I figured would be perfect, so I wrote this code:

function getrotationdifficulty(p: BasePart): number
	return p:AngularAccelerationToTorque(Vector3.new(1,0,0)).X
end

However, it gives the following error:
BasePart:getAngularAccelerationToTorque is not enabled

I am confused.

Extra unnecessary context: I’m trying to make a realistic manual cart for a cart ride game, so if anyone could help me with all the other problems which I have no idea how to solve, please tell me. This code is for making all the powered wheels spin in the same way as the driveshaft

Brainrot title naming on devforum is crazy ngl :skull: :raised_hand:
AngularAccelerationToTorque is not even documented
its not a feature yet

Don’t vibe code please.

You are probably looking for a property: AssemblyAngularVelocity

function getrotationdifficulty(p: BasePart): number
	return p.AssemblyAngularVelocity.X
end
1 Like

That also could probably be just a force convertion feature
Etc 5*workspace.Gravity and so on
So you should not be bothered much about it

Well yes, I already have code to check the velocity. My problem is in finding out how much power is needed to move it, so I can calculate how much new velocity in a body some already existing velocity in another (heavier/lighter, bigger/smaller) body would convert to. I was thinking of using this sussy function as a workaround to get what I believe is called the moment of inertia.

Also im not vibe coding im just using chatgpt to understand physics.

You can google how to calculate the moments of inertia for various basic shapes like cubes, tubes, cylinders, etc. But if you have custom meshes, unions or are trying to get the MOI of a whole assembly it’s pretty much impossible to calculate it. The only real way you can get the MOI of those is by applying an impulse and measuring how much the object’s angular velocity changed and then saving that result.
And the :AngularAccelerationToTorque() function does indeed exist, however it doesn’t work because Roblox thinks it’s funny to troll people by creating fake functions that do nothing.

Also, you should never use AI for anything. It always gets everything wrong. The only thing AI is good at is convincing people its retardation is fact by sounding overly confident, and because people never bother to fact check whatever it says.

1 Like
  1. Thank you! I’ll try to see how not scuffed I can make an impulse-measyre-unimpulse thing. If it ends up too scuffed, I’ll try to calculate the MOI manually, as the assemvlies don’t change and just consist of two cylinders (for train wheels)
  2. I totally agree that Roblox do trolling
  3. AI can be really useful if used very carefully IMO. For example I didnt know what the MOI was called before I asked ChatGPT and this post would sound really weird if I just said “rotation difficulty” all the time. But I do agree that actual vibe coding is the most frustrating thing known to man.