Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How would I make a custom hotbar?

Asked by 7 years ago

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

0
hotbar ? User#5423 17 — 7y
0
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. KidTech101 376 — 7y
0
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. jatytech 45 — 7y
0
I'm not sure how jailbreak does it or how they remove their hotbar, but I would look into GUIs JarFullOfMayonnaise 48 — 7y
View all comments (2 more)
0
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. KidTech101 376 — 7y
0
you do realise you can just... click a number key? have you ever played.. any game? ever? User#28022 0 — 5y

1 answer

Log in to vote
0
Answered by 7 years ago

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

Ad

Answer this question