local b = script.Parent.ToggleButton
local f = script.Parent.MenuFrame
local cb = script.Parent.MenuFrame.CloseButton
b.MouseButton1Click:Connect(function()
f:TweenPosition(UDim2.new(0.268, 0,0.263, 0),"Out","Quint")
end)
cb.MouseButton1Click:Connect(function()
f:TweenPosition(UDim2.new(0.26, 0,-0.9, 0),"In","Linear",0.5)
end)
to work on the “CloseButton” and with the “ToggleButton”
What I mean is that it can do “In” tween with the ToggleButton.
Basically I just want the toggle button to have the same use as the closebutton
Can somebody help?
local open = false
local function Open()
if open == true then return end
open = true
-- tween open
end
local function Close()
if open == false then return end
open = false
-- tween closed
end
local function Toggle()
if open == false then
Open()
else
Close()
end
end