New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Trying to use cframe and cframe.angles at same time?

Asked by 9 days ago
local character = workspace.Dummy
local jointrarm = character.Torso["Right Shoulder"]
jointrarm.C1 = CFrame.new(1,0.3,0.76) jointarm.C1 = CFrame.Angles(1,1,1)

I am trying to use cframe.new and cframe.angles at the same time but cframe.new only fires. I am getting no error.

1 answer

Log in to vote
0
Answered by
royaltoe 2543 Moderation Voter Community Moderator
9 days ago

To use both at the same time, multiply your CFrame.new() * CFrame.Angles()

The following will put your part at 1, 0.3, 0.76 and will rotate the brick 1 radian which is about 57 degrees. If you want to rotate it one degree instead, sat math.rad(1) instead of 1.

newCFrame = CFrame.new(1,0.3,0.76) * CFrame.Angles(1,1,1)
jointrarm.C1 = newCFrame
0
Thanks antoniorigo4 0 — 9d
Ad

Answer this question