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

Is there a way to add two CFrames?

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?

2 comments

0

If it spun the wrong way did you try simply reversing the signs of the coordinates?

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

1 answer

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. 

3 comments

0

I'm using tween service how would I apply that to tween service

0

Basically use "local goal = {CFrame = part.CFrame * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0) }".

0

Can I use this for orientation?

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