local clickdetector = script.Parent:WaitForChild("ClickDetector")
local TweenService = game:GetService("TweenService")
local door1 = script.Parent:WaitForChild("Door1")
local door2 = script.Parent:WaitForChild("Door2")
local tweeningInformation = TweenInfo.new(
	.5,	
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.In,
	0,
	false,
	0
)
local door1open = {CFrame = CFrame(-113.812, 6.594, -2.288)}
local door2open = {CFrame = CFrame(-113.812, 7.373, -2.289)}
local door1close = {CFrame = CFrame(-113.812, 6.594, 4.212)}
local door2close = {CFrame = CFrame(-113.812, 7.373, 4.211)}
local tween1open = TweenService:Create(door1,tweeningInformation,door1open)
local tween1close = TweenService:Create(door1,tweeningInformation,door1close)
local tween2open = TweenService:Create(door1,tweeningInformation,door2open)
local tween2close = TweenService:Create(door2,tweeningInformation,door2close)

clickdetector.MouseClick:Connect(function(Player)
	tween1open:Play()
	tween2open:Play()
	wait(5)
	tween1close:Play()
	tween2close:Play()
end)

1 comment

0

instead of using variables for your door1opens, use functions. might not do much but itll be easier