Hello I have a scrolling frame and to scroll I’m changing the canvas position. I have a list of canvas positions that i want the script to move the scrolling frame to when a certain thing happens.
For some reason I have noticed that the scrolling frame’s canvas position works differently on different sized devices. Even though the positions are set on scale.
How do i fix this?
This effectively makes it almost impossible to guess the correct position for each different device.
Yes i do. I’m using a UiListLayout as well but when i look at the position properties the positions are on scale
(The scrolling frame isnt going outside the mobile players screen, its just that on mobile players screen the canvas position is more dramatic than pc)
for i,v in pairs(game.StarterGui.ScreenGui:GetDescendants()) do
if v:IsA("Frame") or v:IsA("ScrollingFrame") or v:IsA("ImageLabel") or v:IsA("ImageButton") or v:IsA("TextButton") or v:IsA("TextLabel") or v:IsA("TextBox") then
if v.Position.X.Offset ~= 0 or v.Position.Y.Offset ~= 0 or v.Size.Y.Offset ~= 0 or v.Size.X.Offset ~= 0 then
print(v.Name)
end
end
end
I just ran this code in command prompt and it didnt print anything.
(And yes i tested the code by putting a frame that had offset instead of scale and it did print it)
I figured out the reason it was scaling it Incorrectly is because all the gui was inside a frame which caused the scrolling frame to increase the size of that frame when the screen changed resulting in this