Scrolling Frame doenst size correctly when on mobile (other resolution)

Hello there,
i need help! Im tweening some scrolling frames (like a case system)
but as you can see, if i change the resolution at sometime the scrollingframe with the marker (that indicates which item is given) just stops scrolling and stands still or it just goes to a blank space, ive tried autoscale plugins, they didnt seem to work.

Here is the footage:
robloxapp-20221013-2049571.wmv (1.3 MB)

Try adding UIAspectRatioConstraint as a child of scrolling frame you have problem with. You can keep me updated on your issue if you want :smiley:

2 Likes

Sorry, not working, still resolution is bad and it goes to a blank space.

1 Like

UIAspectRatioConstraint would probably work like @dominik2204 adviced, however you may be using it incorrectly. What is the size of the scrolling frame? I might be able to help.

thanks, so the size is {0.552, 0},{0.128, 0}. but i dont think that may be a problem because the canvas size is the problem, it just stops at a moment but any help is appreciated

Scrolling is always weird on different resolutions. However, try applying a UIAspectRatioConstraint with a ratio of 4.3125. This makes it so that it’s always the same width on all devices.

This MIGHT fix the problem, however this might not have the desired effect you’re having

I think the UI Grid layout here is the issue, it is scaled with offset, well i want it on all sizes as the same cell size, how would i be able to do that?

Ah, can I see the settings you have on the GridLayout? I’ve had similar issues with this as well

Sure,

Cell Size: {0, 120},{0, 123}
Cell Padding: {0, 100},{0, 100}

Screenshot_12

Thanks.
You could try switching Size and Padding to use scale instead of offset. Obviously, you probably have to change scripting for it to work properly, but try testing it before scripting to see if it lands in the same spot every time.

Nope. Doesnt work

Screenshot_14

game.Players.LocalPlayer.PlayerGui.UI.Dashboard.CaseOpening.MainOpenBLUE.ScrollingFrame, TweenInfo.new(4, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out, 0, false, 0.5), {CanvasPosition = Vector2.new(450, 0)}):Play()

Ive added like 40 cases, this is practically impossible, since im working alone

I just need help with the layout this is i think the issue here

The issue here is that on different resolutions, the scrolling frame isn’t big enough to display the whole thing.

I think doing some math could solve the problem.

-- storing the scrolling frame so that we don't have to keep referencing it
local scrollingFrame = game.Players.LocalPlayer.PlayerGui.UI.Dashboard.CaseOpening.MainOpenBLUE.ScrollingFrame

-- getting the X size of the scrollingFrame in pixels
local sizeX = scrollingFrame.AbsoluteSize.X

game:GetService("TweenService"):Create(scrollingFrame, TweenInfo.new(4, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out, 0, false, 0.5), {CanvasPosition = Vector2.new(450 - (sizeX/2), 0)}):Play()

I have no idea if this would work since I don’t have everything to work with, but I think somehow incorporating the scrolling frame’s size into the equation might help.

Math is my disability… cant you send any example?

Hello?