Frame control issues

Hello, I need a hand in my localscript, I need to convert the “OffSet” of a frame into a 100% percentage and create a function to control it, how can I do it? any ideas?

My idea is then to have control for the following:

  • Make the frame show only 25%, etc.

I have tried to do it on my own but I cannot do it and it has been difficult for me, someone could give me a hand, I would appreciate it very much …

¿How to convert this value of a frame to → 100% ?
image

Here is the frame that I want to control
image

I need to make 507 of the frame to be the 100% and then create a function to make it convert to 25%, or whatever other value I want.

2 Likes

Why don’t you multiply 507 by a percentage?:

local Scale = 0.25 -- 25%
Frame.Size = UDim2.fromOffset(507 * Scale, 36)
3 Likes

Thanks you a lot! this works! :smiley:

2 Likes