BillboardGui covers adornee part

I’m trying to make a billboard gui that hovers close to the adornee part (shown in the picture below), but depending on how far away the camera is from the part the gui can either cover the part entirely or appear further away from the part.

Screen Shot 10-25-21 at 04.19 PM

(camera further away from part)
Screen Shot 10-25-21 at 04.19 PM 001

Is there a simple script that can fix this?

you are probably using offset right now for scaling the ui, but you should be using scale.

This plugin changes it automatically for u with one button click!

Screen Shot 10-25-21 at 05.13 PM
it just breaks the gui

Change the scaletype, its probably on crop right now. In the properties window.

What scaletype do i change it to?

Try some out, probably stretch or fit. If that doens’t work just let me know!

I tried all of them the gui just looks weird also scale makes the gui smaller when you’re further away.

Yea or the ui gets smaller how further you go away(scale), or the ui stays the same way which you had at the start(offset). And i assume the buttons inside the ui are offset aswell, which need to be changed to scale then aswell.

I want the gui to stay the same size even if you’re far away.

The image object might be using offset, you have to convert it to scale too

Using scale makes the size of the gui change depending on the distance from the camera.

So do you want a mix between scale and offset?

i would like to use offset but make it so it doesn’t cover the adornee part

Try playing around with the scale and offset until you get some good results
UISizeConstraint might help you too

UISizeConstraint won’t make the gui keep the same size.

It might help you to clamp the size so it could cover the part :man_shrugging:

Scaletype isnt the problem or what he said. It’s doing tht because your actual frame/textlabel/textbutton or whatever is within your bilboard is using offset. everything should be using Scale. Why do you need to use offset for a worldspace part. you can achieve position/size with Scale instead of offset with no difference.

If i use scale the gui gets really small when the camera is far away.

then make the bilboard gui use offset instead of scale. if you want a limit to how big it can get from distance then you would need to renderstepped on client with something such as math.clamp()
to make sure it never exceeds a specific number

I want it to not cover the part when the camera is far away (shown in the screenshots)