I am trying to make a custom hotbar because the default ROBLOX one is not compatible with my game. How would I go on to start making it? Any references I can use?
pls link me some pages I can use
I am trying to make a custom hotbar because the default ROBLOX one is not compatible with my game. How would I go on to start making it? Any references I can use?
pls link me some pages I can use
The basic premise is this:
You need a ScreenGui with a Frame and some labels; Alter that Gui to look however you want it to look.
Then, in a localscript inside of the GUI, you'll have to write control functions.
This could be something like:
local inputservice = game:GetService("UserInputService");
local labels = script.Parent.labels;
inputservice.InputBegan:connect(function(input)
if(input.UserInputType == Enum.UserInputType.Keyboard)then
if(input.KeyCode == Enum.KeyCode.G)then
-- player pressed G, so equip the grenade and set the grenade label's color to red
equip("Grenade");
labels.GrenadeLabel.BackgroundColor3 = Color3.new(1, 0, 0);
end
end
end)
Can't get everything from ScriptingHelpers, so you'll have to figure out how it all goes together yourself. :P
This discussion is preserved as it was. New answers, comments, and votes are closed.
6 comments
hotbar ?
Toolbar / inventory bar. That said, how is the standard roblox inventory not compatible with your game? And you ought to be a little more specific about how you want it to work.
I'm working on a gun game and it will be in first person so you can't just click on the weapon on the toolbar. I also need the toolbar to be bigger in size to see your weapon clearly. For example, look at Jailbreak's hotbar. I want it to be similar to that and I don't really know how to approach making that.
I'm not sure how jailbreak does it or how they remove their hotbar, but I would look into GUIs
I haven't played Jail Break, but couldn't you just use the number keys to select a weapon? Seems faster than moving the mouse. Will write an answer in a little bit anyway.
you do realise you can just... click a number key? have you ever played.. any game? ever?