Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is it possible to make a spinning model script?

Asked by 9 years ago

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

0
Do you still need this answered? :P Redbullusa 1580 — 9y
0
yes! LitoTech 35 — 9y

1 answer

Log in to vote
1
Answered by
Redbullusa 1580 Moderation Voter
9 years ago

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
Ad

Answer this question