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

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

Asked by 4 years 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 5144 Moderation Voter Community Moderator
4 years 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 117 — 4y
Ad

Answer this question