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

How would I make a spinning brick with BodyGyro?

I'm trying to make it spin on the Z axis. But it doesn't work.

Run = game:GetService('RunService')
local radiansPerSecond = math.pi
local unit = CFrame.new(0, 0, 1)			
local BodyGyro = Instance.new('BodyGyro',Part)
BodyGyro.maxTorque = Vector3.new(0, 0, 99999)
			
while true do
BodyGyro.cframe = Part.CFrame:toWorldSpace(CFrame.Angles(Run.Stepped:wait() * 0, 0, radiansPerSecond):toObjectSpace(unit))
end

I've spent too much time on this section of my script and I would really like to finish it.

2 answers

I don't really know about BodyGyros, but I know you can use a BodyAngularVelocity. Also, you spelled CFrame wrong. It should be CFrame, not cframe. Hope this helps!

2 comments

0

I've tried BodyAngularVelocity but it glitches and starts spinning on different axis and for BodyGyro it can be spelt cframe.

0

Did you set it to 0, 0, 10 for AngularVelocity?

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