---------------------------------------------------


local tweenService = game:GetService("TweenService")
This = script.Parent
Lift = This.Parent.Parent.Parent

for i,v in pairs(Lift.Car:WaitForChild("Welds"):GetChildren()) do
	if v.Part1 == script.Parent.Button then v:Destroy() end
end
local weld = Instance.new("ManualWeld", This.Button)
weld.C0 = Lift.Car.Platform.CFrame:inverse() * This.Button.CFrame
weld.Part0 = Lift.Car.Platform
weld.Part1 = This.Button
click = false

for x,x in pairs(This.Button:GetChildren()) do 
	if x:IsA("SurfaceGui") and x.Name == ("Button") then 
		x.Button.MouseButton1Click:connect(function()
			if click == false then
				click = true
				tweenService:Create(weld,TweenInfo.new(0.1),{
					["C1"] = weld.C1*CFrame.new(-0.003, 0, 0),
				}):Play()
				wait(0.1)
				tweenService:Create(weld,TweenInfo.new(0.1),{
					["C1"] = weld.C1*CFrame.new(0.003, 0, 0),
				}):Play()
				wait(0.1)
				click = false
			end
		end)
	end
end
