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

How do I separately change GUI's X and Y scale positions?

Asked by 4 years ago
Edited 4 years ago

Currently I only know how to get both X and Y's Scale and Offset positions

guiObject.Position = UDim2.new(0, 0, 0, 0)

How am I able to just change the Position Scale value of X or of Y? (1st and 3rd of the 0's)

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

You can reference the scale to keep their values.

guiObject.Position = UDim2.new(0.5,guiObject.Position.X.Offset,guiObject.Position.Y.Scale,guiObject.Position.Y.Offset)

This will only change the X scale.

Ad

Answer this question