Automatic Size breaks when using Scale and not Offset

Hello.
For the past 2 days i’ve been trying to make a tooltip that’ll automatically scale depending on the children. Similar to how Pet Simulator 99 / Arm Wrestling Simulator did it.

Picture of how I want it to look:
image

I managed to get it working with offset, however when I scaled it for all devices it broke.
This is how it looks when I use an offset:

PC:

Mobile:

And when I switch to Scale instead of Offset it looks like this on PC:

And on mobile:

I’ve tried making a script that’ll take an AbsoluteSize of all the children and scale the frame to that size but it just broke even more. I’d send the script here however I already removed it because I thought i’d eventually solve it somehow.

I’ve also tried searching on the forum for any possible solutions but found nothing that would solve my issue.

Here’s the file with the frame, etc…:
Tooltip.rbxm (7.1 KB)

I’d appreciate any help. :pray:

Best regards,
Kuba.

1 Like

You can try waiting for the tooltip to be scaled according to the screen size and getting its absolute size, and then once a child is added change the tooltip’s size to the initial absolute size of the tooltip + each individual child’s absolute size + the list layout padding multiplied by amount of children - I could write it myself but you give it a shot

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