--This module is for any client FX related to the DoubleDoor


local DoorFX = {}

local tweenService = game:GetService("TweenService")

local tweenInfo = TweenInfo.new(2, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)

function DoorFX.OPEN(door)
	if not door then return end
	
	for i = 1, 2 do
		tweenService:Create(door["Door" .. i].PrimaryPart, tweenInfo, {CFrame = door["Door"..i.."Goal"].CFrame}):Play()
		door["Door" .. i].PrimaryPart.DoorOpenFADEOUT:Play()
	end
end

function DoorFX.CLOSE(door)
	if not door then return end
	
	for i = 1, 2 do
		door["Door" .. i].PrimaryPart.CFrame = door["Door"..i.."Start"].CFrame
	end

end

return DoorFX
