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

How do I change the angles of a part using script(Im using CFrame)?

Im having a bit of trouble with this-

local Planer = script.Parent

local PositionNew = CFrame.Angles()(10,1,1)

Planer.CFrame = PositionNew

that is the current script but the error says: Argument 3 missing or nil

1 comment

0

PositionNew = CFrame.new(script.Parent.CFrame*CFrame.Angles(math.rad(10),math.rad(1),math.rad(1)))

1 answer

You're calling a number value which is funky. If you want to add to a CFrame, multiply it by another. CFrame.Angles is just a second CFrame constructor with no positional parameters, meaning that the types are compatible (as they're both CFrames) allowing them to be multiplied:

CFrame.new() * CFrame.Angles(...)

Be sure to also have your angles in radians via math.rad. CFrame.Angles is not supposed to take in big whole integers like 10.

Anywho, with that in mind, Planer.CFrame = Planer.CFrame * CFrame.Angles(math.rad(X), math.rad(Y), math.rad(Z))

3 comments

0

Fifkee's first sentence to his ANSWER: I don't even know why that errors

0

shut up it was a typo this is why i blocked you

0

ur so useless honestly

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