Help with changing MaxTorque value through Script

For some reason when I try to edit the MaxTorque of a BodyGyro through a script, the values aren’t changing when I run the script. Any idea why that is?

Have you tried not using math.huge? I think that might have something to do with the problem.

I have and the values are still not changing. However, I am able to edit the D and P values through script.

I found a possible fix on the wiki, it says this:

If a part isn’t moving, consider increasing this value (also check that it is not Anchored or attached to any anchored parts).

Try checking if the part is anchored, Sorry for the late reply.

None of the parts were anchored

Weird, i tried replicating your same scenario and everything works correctly for me:


The script is also the same as yours:

Maybe there’s something else messing with the gyro?