I have created a GUI, but the only problem is this: when the user changes window size/if their screen size is larger or smaller, the GUI stretches. I have fixed my problem of having the position of it changing place when the screen size/window size is changed, but what about it being distorted? It stretches horizontally and I have no idea why.
The reason this happens is that screen sizes have different Width:Length ratios. This means that one screen might have a W:L ratio of 1.5, while another may have a W:L ratio of 1.3.
So, let's apply this to a game. Let's say you have {.5,0},{.75,0}
for a GUI's size. If my screen size was 1500 x 1000 then the GUI's AbsoluteSize would come out at 750 x 750. This would be a perfect square for my screen, but let's say we have the same on a screen with dimensions 1300 x 1000. This would make the GUI's AbsoluteSize come out at 650 x 750, therefore distorting the GUI.
So, to fix this issue, choose either the X or Y scale that you want to keep. Set the scale to whatever you want it to be, then insert one of the following scripts into it.
Scale=0.5 --Set this to whatever you want the scale to be (Any number above 0). Over 1 would have a larger Y size, and Less than 1 would have a larger X size. Scale=1/Scale --Keep this the same script.Parent.Size=UDim2.new(0 , script.Parent.AbsoluteSize.X , 0 , script.Parent.AbsoluteSize.X/Scale)
local Scale=0.5 --Set this to whatever you want the scale to be (Any number above 0). Over 1 would have a larger X size, and Less than 1 would have a larger Y size. Scale=1/Scale --Keep this the same script.Parent.Size=UDim2.new(0 , script.Parent.AbsoluteSize.Y/Scale , 0 , script.Parent.AbsoluteSize.Y)
Anyways, if you did it correctly, it should work now. If you have any further questions/problems, please leave a comment below. Hope I helped :P