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

BodyGyro doesen't rotate?

gyro = script.Parent.Parent['Red Barrel'].BodyGyro
gyro.cframe = CFrame.new(0, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)

All settings except the .cframe are set to default, all the specified members exist, and Red Barrel isn't anchored. The BodyGyro stays in it's same rotation and can be pushed/rotated freely instead of locking onto the cframe. Help?

1 answer

By default, a BodyGyro has a a maxTorque of 400000, 0, 400000. That means the object is free to rotate about its Y axis (looking down from above, it can spin like the hands on a clock) -- the BodyGryo will only prevent it from tipping.

Make sure the y is similarly big to prevent it from spinning.

If the model is very large, you might have to make the maxTorque or P properties larger.

3 comments

0

I dont understand. The Y axis is up and down so doesent that mean a high y torque would prevent it from tipping, but not spinning?

0

Also, if it can still spin side to side, why is it not looking at the CFrame? And another question: Can anchored parts with a BodyGyro still rotate?

1

@drew1017 Q1: The X & Z axes would prevent the object from tipping. Q2: It's not looking at the CFrame, because the 0 maxTorque on the Y component means that it will spin FREELY. Q3: No, parts with a BodyGyro object will not rotate if it is anchored.

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