Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

[Solved] Is it possible to split the AbsolutePosition property of a Gui object?

I would like to split the AbsolutePosition property of a Gui object into two separate integer values.

For example, I'd like to do something along the lines of:

gui = script.Parent
x, y = script.Parent.AbsolutePosition

Edit: What this code currently would do is store a Vector2 value to the X variable and leave Y as nil.

1 answer

I realized that Vector2 values also have a .X and .Y property that can be read. Edit: What I did:

gui = script.Parent
x,y = gui.AbsolutePosition.X, gui.AbsolutePosition.Y

This discussion is preserved as it was. New answers, comments, and votes are closed.