I have ported an elevator system I made from one game to another, and now whenever a CFrame is called, the Orientation is set to (0, 0, 0). This wasn’t an issue in my previous game, which conveniently had the elevator system already facing that way.
But now, I’ve rotated the system to suit my needs, setting its initial orientation to (0, -90, 0), giving the result as shown here:
\
The elevator is facing the wrong direction, as a CFrame is called at the start of its script.
local RootPart = game.Workspace.ElevatorSystem.Elev.ROOT -- Root Part which has the same sizing and positioning as the Elevator Model object. All parts that make the Elevator model up are welded to this Root Part.
local newCFrame = CFrame.new(-28.15, -6.4, 83.35)
RootPart.CFrame = newCFrame
The doors are normal at first, as their CFrams is only called when the button is pressed, which calls a Tween function to the CFrame.
-- RED
local goal = {}
goal.CFrame = CFrame.new(-20.15, -6.6, 76.55) -- to open
wait(0.5)
local tweenInfo = TweenInfo.new(3)
local tween = TweenService:Create(TopRedRootPart, tweenInfo, goal)
tween:Play()
wait(2)
-- MESH
local goal = {}
goal.CFrame = CFrame.new(-20.15, -9, 76.35) -- to open
local tweenInfo = TweenInfo.new(2)
local tween = TweenService:Create(TopMeshRootPart, tweenInfo, goal)
tween:Play()
wait(2.5)
I tried reading the Dev Wiki entry on CFrame, but was unable to decipher the issue from the information present. I also tried looking for anyone else on the Dev Forum who may have had a similar issue, but was unable to find any in my search queries.
It should also noted that no scripts have printed any errors to Output. If anyone can help me solve this issue, I would greatly appreciate it.