Hello, I would like to make elevator doors open to just the left (there are 2 doors).
I am trying to achieve this with TweenService.
However, I cant figure out how to make the doors resize to just the left.
One of the solutions I tried was Cframes, but I got an error that said “Cframe expected got nil”
Here is my code:
local TweenService = game:GetService("TweenService")
local doors = script.Parent.Elevator_Door:GetChildren()
local goal = {}
goal.Size = Vector3.new(1, 8, -0.3)
local tweenInfo = TweenInfo.new(1)
wait(3)
for i = 1, #doors do
local tween = TweenService:Create(doors[i], tweenInfo, goal)
tween:Play()
end
I think when you put “Cframe” instead of “CFrame” it gave you an error. You need to capitalize the F. I’m not sure if that is the solution to your problem but let me know if it is.
When you say just to the left, you mean the current code works but they resize to the left and right?
If so, the parts should have a pivot point which can be relocated. It is this point around which the size is calculated so moving this to the left side of the part should cause the Tween to shrink from the right only.