Scrolling Frame Issues

The issue is that scrolling frame clips dropdown frame when it’s not even fully hidden

So I have a script that does dropdown effect

local Tween = game:GetService('TweenService')

local Dropdown = script.Parent
local Element = Dropdown:WaitForChild('Frame')
local Button = Dropdown:WaitForChild("TextButton")

local toggle = false

Element.ZIndex = -1

Button.MouseButton1Click:Connect(function() 
	if toggle then
		toggle = false

		Tween:Create(Element,TweenInfo.new(.25,Enum.EasingStyle.Quad,Enum.EasingDirection.In),{Position = UDim2.fromScale(0,0)}):Play()
	else
		toggle = true

		Tween:Create(Element,TweenInfo.new(.25,Enum.EasingStyle.Quad,Enum.EasingDirection.Out),{Position = UDim2.fromScale(0,1.15)}):Play()
	end
end)

How can I fix this?

In a very simple recreation I just made, I appear to not have this problem.

I copied your code exactly, and set up the UI how I expected that it would be for you (given how your script obtains the Instances)

Can you share more information about the setup of your UI?

This is how I have my UI set up. The child TextButton is the same size as the Dropdown frame. And, Frame, which is what the tween moves, does not get cut off when I scroll too far in the ScrollingFrame :thinking:

Here’s rbxl file, maybe something’s wrong with my gui properties

dropdownIssue.rbxl (69.9 KB)

I think I got it working.

Under Dropdown, I changed AutomaticSize from XY to None and ClipsDescendants to false.

I hope this helps. Lmk if it doesn’t work for you

It’s most likely a property that causes this issue.
Maybe the dropdown menu isn’t rendered when the parent frame dissapears, try these:

  • Try setting Active to true
  • Try setting ZIndex to a higher value

I’ve never encountered this before. You’re probably using a UIListLayout so try to putting it directly into the ScrollingFrame but into a Frame, so it looks something like this:

Don’t:

ScrollingFrame
→ UIListLayout
→ Elements…

Do:

ScrollingFrame
→ Frame (Size = UDim2.fromScale(1,1))
→ -> UIListLayout
→ -> → Elements…

Turning off AutomaticSize actually works. However , when there are multiple dropdowns, opening one dropdown doesnt “push” others down.

2 Likes

Nothing of that worked unfortunately. I’m so tired of this scrolling frames :sob:

1 Like

Maybe you could tween the size, too?