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

Is there a way to add two CFrames?

Asked by 4 years ago

I am tying to add to CFrames for a door using CFrames I tried changing the Orientation and Position but it spun the wrong way. It worked using CFrames but I want to make the door and open relative to it's position I can't obviously add CFrames but is there a way?

0
If it spun the wrong way did you try simply reversing the signs of the coordinates? SerpentineKing 3885 — 4y
0
The closing animation spun the wrong way and I didn't have any signs to flip for that because I defined the original variables lukeh990 23 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

To change an object's orientation do this:

local obj = workspace.Object --Name of your object

obj.CFrame = obj.CFrame * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
--Enter the number of degrees you want it to rotate on the x, y, and z axis. 
0
I'm using tween service how would I apply that to tween service lukeh990 23 — 4y
0
Basically use "local goal = {CFrame = part.CFrame * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0) }". youtubemasterWOW 2741 — 4y
0
Can I use this for orientation? lukeh990 23 — 4y
Ad

Answer this question