Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do you make a gui a square on all screens?

Asked by 9 years ago

I have tried using Offset but because some screens are bigger, the gui won't be in the same position either.

2 answers

Log in to vote
0
Answered by
dyler3 1510 Moderation Voter
9 years ago

To get a gui to be the same on all screens, and to make it square you simply need to set the X.Scale, and then set the AbsoluteSize.Y to the same as the AbsoluteSize.X


script.Parent.Size=UDim2.new(0,AbsoluteSize.X,0,AbsoluteSize.X) --This would set the Y size to the same as the X

Before using this script, make sure that the X size is already set on the gui.


Anyways, I hope this cleared things up for you a little bit. Hope I helped as well :P

0
But if the screen gets larger in the X direction, the gui will stretch and it won't be a perfect square. Lets say my gui is (0,500,0,500) on my screen, how do I scale that up with larger screens? devQuestions 25 — 9y
0
Ah, I'm sorry I misread your question. Check back on my answer in a min, and I should have it updated. dyler3 1510 — 9y
Ad
Log in to vote
-1
Answered by 9 years ago

just saying the correct script from above

script.Parent.Size=UDim2.new(0,AbsoluteSize.X,0,AbsoluteSize.X)

Answer this question