For a script I'm writing, I need to define x and y, and they need to be the x and y values of the position of a button called "CURRENT". is there a way to do this? I tried
local x = CURRENT.Position.UDim2.new.x local y = CURRENT.Position.UDim2.new.y
but obviously UDim2 isn't a part of Position. Let me know if I need to clarify anything. Thanks!
Like this:
xOff = CURRENT.Position.X.Offset--will get the offset for x xScale = CURRENT.Position.X.Scale--will get the scale value for x yOff = CURRENT.Position.Y.Offset--will get the offset for y yScale = CURRENT.Position.Y.Scale--will get the scale for y print(CURRENT.Position)--will print 4 nums(i think) print(CURRENT.Position.Y)--should print 2, both the y scale and offsets print(CURRENT.Position.Y.Offset)--will just print the y offset
for further information check the wiki page for UDim2