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

How do I make my tool unequippable and not show up?

Asked by 4 years ago

I am making a game and I need to have a tool but I dont want to have the player to unequip the tool, how do I make it work?

Also I want it to not be able to show up in the toolbar how do I do that?

0
Are there going to be any tools other than this one because in that case you can't hide that single tool in particular from the toolbar without hiding everything else. To do that you would have to put the tool somewhere that isn't the Backpack. lunatic5 409 — 4y
0
No there is only 1 tool HollowStreak 18 — 4y
0
Okay then Wafflecow321's answer should work. lunatic5 409 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago

In this case, you would want to first disable the backpack in a local script using the startergui method, like this:

game:GetService("StarterGui"):SetCoreGuiEnabled("Backpack",false)

From there if you had to equip the tool you could use the humanoid EquipTool() function to force the player to equip the tool. Note that this can be done on either the server or client but if you want to be 100% certain all players are getting it equipped you should probably do it from the server.

humanoid:EquipTool(tool)
Ad
Log in to vote
0
Answered by 4 years ago

Forces the equip

while true do
    wait()
    if script.Parent.Parent.Name == "Backpack" then
        script.Parent.Parent = script.Parent.Parent.Parent.Character
    end
end

Answer this question