Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would I make a custom hotbar?

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

6 comments

0

hotbar ?

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.

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.

0

I'm not sure how jailbreak does it or how they remove their hotbar, but I would look into GUIs

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.

0

you do realise you can just... click a number key? have you ever played.. any game? ever?

1 answer

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.