How can I always make my UI remain ontop of the hotbar

So here is my delima.
I always want my hotbar to be directly above the hotbar, Not too high above it and not covering it.
This is my UI placement in studio:


Looks good right?

However if I hop in-game:


its too high over the hotbar
Now I can always lower it even more but then it will cover the hotbar with other displays and I dont want that. How can I make it so its always DIRECTLY above the hotbar for all display types? Thank you in advance!

Make your UI have a Y scale of 1 and a negative offset. This is how the hotbar is positioned in Roblox.

3 Likes

Tysm for the help worked like a charm.
Followup unrelated question. Is it possible to 9 slice my UI but ignore the center? As you can see my UI has a circle in the middle so if I 9 slice it the circle gets stretched out. and if I move the slice to one side of the UI it will only stretch that side.

I’m unsure. I’m not really sure how slicing works internally, but I’d think your best bet is to use two separate images.

1 Like

You could probably try to split the image into 3 sections as shown below:

image

From there you could use 9 slice in the sides while not using it in the center so it doesn’t stretch.

1 Like

I thought of this and actually tried it but if u combine images there is a small line that appears between the images.

How about this, a bit more complex but might be feasible:

since I’m assuming the priority is the “main bar” (red) you could let that have 9 slice, while you the other have Fit ScaleType. The circle will have the highest Z-index so it overlays.

Or but this might be less feasible:

This may let you use all the bars with 9 slice.

1 Like

I’ll try this out when I get the chance and let you know how it goes.

1 Like

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