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

Toolbar invisible but it doesent work?

Asked by 5 years ago

Im using this script to hide the toolbar but it also doesent let me equip the tools?

local StarterGui = game:GetService('StarterGui')

StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false) StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)

1 answer

Log in to vote
1
Answered by
xPolarium 1388 Moderation Voter
5 years ago
Edited 5 years ago

The Enum on line 03 is Enum.CoreGuiType.All and you had used this to disable All CoreGuiTypes. Backpack is one of these CoreGuiTypes. This won't allow you to select tools using the Inventory that Backpack provides you. Just add to the code if you want it back:

local StarterGui = game:GetService('StarterGui')

StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false) 
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)

Alternatively you could keep the Backpack Inventory UI hidden and just set up a system that uses the Humanoid:EquipTool() function.

:EquipTool()

Ad

Answer this question