-
What do you want to achieve?
I want to be able to create a sidebar, where all the buttons on the sidebar can be hidden away or shown. I’m just polishing up my UI. -
What is the issue? Include screenshots / videos if possible!
The issue is that I don’t know how to do the tweening properly for all the frames where when you close the sidebar, all the buttons go away and appear when you open up the sidebar. A potential problem I see with this is the “Song” Frame, because of the ImageLabel named “Frame” and the Handler having potential conflicts.
This is what my sidebar looks like:
This is what it does right now EDIT: The positioning of the sidebar has been corrected since that recording:
My Frames set up:
This is the current local script I have so far which only slides the sidebar itself, I don’t really know how to do a loop to move all the other frames together and have an exception for the Frame imagelabel inside of the Song Frame:
local Open = UDim2.new(0, 0,0.276, 0)
local Closed = UDim2.new(-.035, 0,0.276, 0)
script.Parent.OpenClose.MouseButton1Click:Connect(function()
script.Parent.OpenClose.Text = script.Parent.Position == Open and " <<<" or " >>>"
if script.Parent.Position == Open then
script.Parent:TweenPosition(Closed)
else
script.Parent:TweenPosition(Open)
end
end)
Also, i’m not very experienced with Tweening, so I’m a little lost.