Hello, I was wondering what might be the best way to scale a hotbar. Upon looking at the default roblox hotbar scales, I noticed it simply keeps its size. Would that be smart with mobile/xbox GUIs? If yes, is there a better way to scale the gui to keep it more comfortable (in terms of how easy it is to see/click on etc) across screen sizes?
The best way to scale a custom hot bar would be to measure the X size of a player’s screen. If the screen is much bigger than the hot bar, scale it up. If the screen is smaller than the hot bar, remove some hot bar slots then scale it down accordingly. The roblox hot bar is not maintained on all devices. Most phones only have 3 hot bar slots.
local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local quickbar = playerGui:WaitForChild("Quickbar")
if quickbar then
quickbar.Visible = true
quickbar.SlotCount = 5
end