How can I make the imagebillboardgui scale?

Alright, so I have a nametag in my game, and I want an image beside the name. The issue is, the image doesn’t shrink when the camera gets closer, when the text does (text behaves as it should)

images as example:
(should look like)
Screenshot 2024-11-10 200207

(image doesn’t scale)
Screenshot 2024-11-10 200213

this is the explorer hierarchy
image

Put the PlayerName and StreakIcon inside a Frame within the UI. Then make the Frame scale instead. Adjust the PlayerName and StreakIcon’s size scale and position scale properties until they fit correctly inside the Frame, as they will now behave relative to it rather than the UI. Lastly, add a UIAspectRatioConstraint within the Frame and set it to something like 5

I made this to demonstrate. Let me know if it helps

nametagexample.rbxm (32.4 KB)

Sorry for being late, but I just looked through your example, and did what you told me, but it still isn’t working. I made sure everything matches too.

One problem is that no matter what you do TextLabels have a maximum size, even in BillboardGuis. Because of this, when getting your camera very close to the text, it will appear to be shrinking if you get past the point where the text is displaying at the maximum TextSize. In realty, it is remaining the same size, 100. That’s why in my example I made the BillboardGui kind of small, that way the TextSize doesn’t hit the upper floor as easily

The text works fine, it’s still the image. no matter what, I can’t get it to change size with the text. It’s always the same size.

Hmm, from what distance does this start occurring? Send a video of the camera starting from like 100 studs away then zooming in to 0.5 studs away.

Also, did my example UI have the same problem?

Your example worked, that’s why I’m confused. I don’t think a video would help, the image doesn’t scale at all, no matter my distance.

Alright, upload the UI here, I’ll take a look at it’s properties.

Right-click the BillboardGui > Save to File

Nametag.rbxm (9.8 KB)

hold on, here’s it on a dummy, I didn’t think about giving that.
Dummynametag.rbxm (28.5 KB)

Right, I’ve checked it out and it looks like it’s working as expected. The issue we’re seeing is what I explained in this post, but let me explain it better

You don't have to read this it's just a semi-comprehensive explanation for why the behavior is occuring

The image not getting smaller isn’t the problem. The text staying the same size is.

There’s no property of the TextLabel that should make it shrink when your camera gets close to it. In fact, as your Camera gets closer to the text, it’s supposed to get bigger and bigger until you can’t read it anymore.

Instead, the text remains the same size when you get really close. If you put your finger on each edge of your TextLabel on your screen and keep zooming in, you’ll notice it isn’t shrinking, it’s locking in size. What you’re seeing is the TextSize 100. Technically the TextLabel isn’t shrinking, changing its BackgroundTransparency to 0 will prove this. However Roblox does not allow Text on ScreenGuis to exceed 100, and BillboardGuis are basically just ScreenGuis that the engine shifts around along with camera movements to look 3D.

Because of this, the Text is hitting 100 then never growing any bigger. On the other hand the Image has no upperfloor to it’s size

Anyways, I fixed the mismatch between the ImageLabel and TextLabel by adding a UISizeConstraint. Now when the camera gets real close the image and text will scale together. I also made the AnchorPoint and Position of the frame 0.5 that way it’s centered.

Let me know if it works:
fixednametag.rbxm (10.2 KB)

Place1name.rbxl (60.9 KB)

Thank you so much! Thanks for being patient with me, and thank you for helping.