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

Is it possible to make a spinning model script?

I have tried the script below but it only seems to spin one part. I want the whole model to spin (It is a model of my character) Can someone help me?

spinning = script.Parent

while true do spinning.CFrame = spinning.CFrame * CFrame.fromEulerAnglesXYZ(0, math.rad(0), 0.01) wait(0.00) end

2 comments

0

Do you still need this answered? :P

0

yes!

1 answer

✓ Accepted answer

There are many ways to do this. Inserting a BodyAngularVelocity (featured in the "Epicsauce" gear.)/BodyGyro object is some of them. But what I'm going to demonstrate that doesn't require those objects features the PrimaryPart property.

What this does is that it enables you to use these methods: :MoveTo() and :SetPrimaryPartCFrame()

They're almost the same, but :MoveTo() changes the Vector3 property, while :SetPrimaryPartCFrame changes the CFrame property.


Since the PrimaryPart is already included in a character object, you can just use one of these methods right away.

Spinning_Model = script.Parent

while wait() do
	Spinning_Model:SetPrimaryPartCFrame(Spinning_Model.CFrame * CFrame.Angles(0, math.rad(10), 0))
end

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