ImageRectSize/ImageRectOffset in ImageButton makes the image disappear

,

When i change ImageRectSize or ImageRectOffset in ImageButton, the image just disappears.

Before:

After:

I think someone else is having this problem too:

I tried to change ScaleType but it didn’t work.
What should i do?

2 Likes

Both require very specific numbers if those numbers aren’t the right one than the image can go transparent. I won’t tell what those numbers are becuase I myself don’t really know the calculations. But thats just a basic overview for you. Also it has to do something with the actual image size. (Not to be confused with the image label/button size)

Documentation: ImageLabel | Documentation - Roblox Creator Hub

1 Like

So this is a bug? Even if i change the numbers to just 0.1 it still disappears.

Wait a bit ill show you how you can accomplish it…

2 Likes

I made this:


The image is a 720x720 image and the image rectsize is set to 240x240 i.e 1/9th of the total image and then I use a position like 0,0 for top left and 720,720 for bottom right and thats basically how you use it.

In-short you need the image size and then you can use imagerectsize to say scale the image and use imagerectoffset to move the scaled image.

For example I zoomed in the same image:
image

(More zoomed:
image)

Sorry for sending after an hour. It seems like devforum died.

2 Likes

I will be honest, this doesn’t help my problem, it seems like this is just a bug. But thank you very much for your effort, i will still give you the solution mark.

May I ask what your trying to actually solve?

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