Custom Hotbar/HUD tool help

Ok, so my initial plan is to create a 5 tool max HUD/Hotbar, something like Minecraft.

I want the tools to go into each HUD bar, and have their model thumbnail/picture in the middle of it.

I currently have just a roblox decal set as the first HUD bar, I would like to know how to link the backpack to the HUD so that all the way up to 5 tools, you can have them set in the HUD I’ve created.

2 Likes

You could just do a pair loop over all of the users tools and put them in an available slot.

Alternatively you can wait for a child to be added and put it in an open slot then, ChildAdded

2 Likes

Just something maybe for future reference when putting “items” in a custom toolbar:

If you’re set on doing decals, that’s fine and you can ignore this post. But if you want to try to display items in a different way, you can try out ViewportFrames! I really recommend reading the linked post.

A method I would use is make a VF, align and size it however you want, make background transparent, clone a tool from ReplicatedStorage, parent it to the VF, position it at origin, make camera a few studs away and point it at the item. This would only hit performance slightly on loading the tool in the VF initially because after that everything is inanimate and there will be no need for updates.

I hope you find your solution!

2 Likes

I’ve got a command I run VIA the Roblox Studio command bar that automatically sets a very good looking thumbnail to uploaded assets, and I am using that for my model thumbnails, so my initial plan is to use all tool.TextureIds as the thumbnails for the tools. I sorta only like using ViewPortFrames when there are parts involved, like an inventory and such. But thank you so much for explaining that to me.

1 Like

You can use ViewportFrames to display the items the user picked up etc.