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

Could someone please answer my two questions I have on CFrame rotation?

wait(2)

script.Parent.CFrame = CFrame.new(script.Parent.Position.X, script.Parent.Position.Y, script.Parent.Position.Z) * CFrame.Angles(math.rad(10),0,0)

Question 1: Why do you multiply (*) when you're gonna rotate? Question 2: Why do you need to put the position infront of the rotation before?

1 answer

(*) in this case acts more like a (+) as it is used for combining the position CFrame(im just gonna call it that) with the orientation CFrame. we have to include the position CFrame with along with the orientation CFrame as u have to remember u r adjusting the CFrame as a whole and not just changing the orientation. for instance it would not be logical to give a oreintation CFrame by itself when defining the CFrame of a part. As for the placement of the two i am to believe that it is standard format, and would be overall more logical to do it this way(such that the script ascertains the position of the part before deciding on how it should rotate it).

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