Hello, Does anyone know how I could edit my script so it only goes up from one side on the Y Axis?
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(speed, Enum.EasingStyle.Quad)
local door1 = script.Parent.lockerClosed
local defaultSize = door1.Size.Y
ccd.MouseClick:connect(function()
if isOpen == false then
local goal = {}
goal.Size = Vector3.new(door1.Size.X, foldedSize, door1.Size.Z)
goal.Position = Vector3.new(door1.Position.X, door1.Position.Y - door1.Size.Y/2 + foldedSize/2, door1.Position.Z)
local tween = TweenService:Create(door1, tweenInfo, goal)
tween:Play()
door1:SetAttribute("Open", true)
isOpen = true
end
end)
Any Help is appreciated so much!