UDIM2 troubles. Its Y value isnt working

Basically I am trying to create a UDIM2 value that takes the X value of another UDIM2 and sets the Y value too 1. Only problem is it just doesnt work AT ALL!!

Heres my code:

local po = UDim2.new(math.random(5,86)/100,0,math.random(5,86)/100,0)
local finish = UDim2.new(po.X,1,0) -- this should set the UDIM2 value too 2 right???
print(finish)

I figured it out, I just had to change some values

Easier version:

local po = UDim2.fromScale(math.random(5,86)/100,math.random(5,86)/100)
local finish = UDim2.fromScale(po.X.Scale,1)
print(finish)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.