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

Problem with Gui position?

Asked by 10 years ago

I placed a gui on the corner of the screen, but when i play the game the gui appears on a different place what can i do to make the gui appear on the corners?

1 answer

Log in to vote
3
Answered by 10 years ago

I think you changed the position manually and not arithmetically, the position changes from screen to screen, if you want to put the gui in a corner to EVERY user you need to use scale and position:

Upper Left Corner:
Position: {0, 0}, {0, 0}
Scale: {0, yourSizeX}, {0, yourSizeY}

Upper Right Corner:
Position: {1, -yourSizeX}, {0, 0}
Scale: {0, yourSizeX}, {0, yourSizeY}

Lowest Left Corner:
Position: {0, 0}, {1, -yourSizeY}
Scale: {0, yourSizeX}, {0, yourSizeY}

Lowest Right Corner:
Position: {1, -yourSizeX}, {1, -yourSizeY}
Scale: {0, yourSizeX}, {0, yourSizeY}

That's it :) just remember that if you have to change a frame position which contains textlabes, textbox etc. you need to subtract the position X and Y of your frame's component in your frame's scale and position!

1
Thanks dude jorge5879 5 — 10y
0
No problems ;) alessandro112 161 — 10y
Ad

Answer this question