You can use a variable for this:
local isOpen = false
--click event
if not isOpen then
--not toggled, so toggle the UI
else
--toggled, so untoggle the UI
end
isOpen = not isOpen --flip the value of the bool
You can use a variable for this:
local isOpen = false
--click event
if not isOpen then
--not toggled, so toggle the UI
else
--toggled, so untoggle the UI
end
isOpen = not isOpen --flip the value of the bool