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

(ADVANCED) How come a HopperBin wont work with the :EquipTool() Funtion?

Asked by 3 years ago

What? The HopperBin was Roblox's old tools without handles.

-

Why? I'm using the HopperBin tool because they have Amazing Drag and Drop quality's that I want.

-

Why dont you use a Non-HopperBin drag and drop bin? Because the other tools move at 0.05 Studs, While these move at 1 Stud. There simple and Efficient too.

-

How are you doing this? I made a script that Hide the Player tool bar, because I think showing tools is unprofessional. (I dont want to argue about this its just what I think)

When Ever a player presses G, The tool will activate. And you will hold it, but you dont see that your holding it on the bottom of your screen, You just have it in your hand or its equipped.

-

What do you want to Accomplish? I want to Either;

Fix my script so the :EquipTool() Funtion works, Find out if theres a way to transfer the HopperBin to a script and put that in a Normal Tool, Or last resort have to equip tools the Normal Way.

-

This script is located inside the tool.

SCRIPT;

wait(0.001)
EnableBackpackGui = false
local player = game:GetService("Players").LocalPlayer
local mouse = player:GetMouse()
local char = player.Character
local tool = player.Backpack:FindFirstChild("Grab")
print("Found tool")
db=1
function onKeyPress(inputObject, gameProcessedEvent)
    if inputObject.KeyCode == Enum.KeyCode.G then
        print("Pressed G")
        if char then
            game.StarterGui:SetCoreGuiEnabled(2,EnableBackpackGui)
            for i,v in ipairs(char:GetChildren()) do
                if v.className ~= "HopperBin" then
                    print("is hopperbin")
                    wait()
                    if db == 1 then
                        player.Character.Humanoid:EquipTool(tool)
                        db=2
                    end
                end
            end
            tool.Deselected:connect(function()
                db=1
            end)
        end
    end
end

game:GetService("UserInputService").InputBegan:connect(onKeyPress)

Thanks in Advance - Mr Monkey.

Answer this question