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

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

Asked by
Sublimus 992 Moderation Voter
9 years ago

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

Log in to vote
0
Answered by
Sublimus 992 Moderation Voter
9 years ago

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
Ad

Answer this question