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

C-Frame Rotation Script?

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

startCF = script.Parent.CFrame

script.Parent.CFrame = startCF * CFrame.Angles(math.rad(1), math.rad(1), math.rad(1)) 

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

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