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.
Why is this GUI distorted?
1 answer
#Updated ##What Da Heck Is Causin Dis? 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.
##Let's Fix It :P 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.
###For A Set X Scale:
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)
###For A Set Y 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
####-Dyler3
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
I do in fact have a queston. When I set the size in the properties pannel to 0.1, it was a perfect size. But I went into the script and edited it the way you posted it and changed the ".5" to '0.1' but it made it LARGER than it should have been. Help?
Let me edit the script, and try it again.