Tweening frames into a side bar

  1. 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.

  2. 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:
image

This is what it does right now EDIT: The positioning of the sidebar has been corrected since that recording:

My Frames set up:
image

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.

Try parenting everything to the sidebar that moves, so it can bring the buttons along it. And try searching up tutorials for this case, theres alot to help and learn.

Parenting everything to the sidebar worked perfectly fine, actually. For now, there’s a case where the Frame where the music title is displayed, moves along with it when you click on “Close” and have a song switch at the same time, but that’s not really much of an issue honestly.

1 Like

Could I have a screenshot or video? I could help furthermore :grinning_face_with_smiling_eyes:

Yeah sure, I can send you the behavior of everything.

Here is the current state of the sidebar after some tweaks!

Is the music title frame parented under the sidebar frame? Or the music title frame is parented under one of the sidebar frame’s chilren?

image
This is the current set up for everything, it’s most likely due to everything parented under the Song frame which is parented to Sidebar. I’m weary of just moving Frame and Handler somewhere else due to not wanting to break the Handler and the buttons from working properly.

1 Like

I fixed everything, I moved Frame and Handler into its own ScreenGUI and updated directories for the buttons. Everything is working perfect now c:

1 Like