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

C-Frame Rotation Script?

Asked by 10 years ago

I pretty much know a basic script to rotate a brick or a model

script.Parent.Rotation = Vector3.new(0,0,0) script.Parent.Rotation = Vector3.new(1,1,1)

and so on But when I put a hair on my statue and try to move the head to the right, the head just starts to move on top of the hair! If anyone can help, please reply

2 answers

Log in to vote
0
Answered by 10 years ago
startCF = script.Parent.CFrame

script.Parent.CFrame = startCF * CFrame.Angles(math.rad(1), math.rad(1), math.rad(1)) 
Ad
Log in to vote
0
Answered by 10 years ago

If you want to make a group of parts rotate in the same way at the same time, put them into a model then group that model with this script:

local parts = script.Parent.Model

while true do for i,v in pairs(parts:GetChildren()) do v.CFrame = v.CFrame * CFrame.fromEulerAnglesXYZ(0, 0, math.rad(-1)) end wait(0.05) end

Answer this question