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

How would i make a hopper bin keydown weapon?

I dont know what bin type to do and how i will go about doing this

1 answer

✓ Accepted answer

HopperBins are deprecated, and so is Keydown.

To replace hopperbins, Roblox added a boolean value to tools called "RequiresHandle". Turn it to false, and you have a hopperbin, and to replace KeyDown, use the user input service.

Since the user input service is client-only, put this in a LocalScript

local UserInput = game:GetService("UserInputService")
UserInput.InputBegan:Connect(function(input,processed)
	if processed == false and input.KeyCode == Enum.KeyCode.E then -- Change this to your preferred key
		-- do stuff
	end
end)

You don't even need a hopperbin/tool for something to happen when you press a key (unless it is how it works.)

If I didn't answer your question properly, then you probably need to provide code, because this is a help site, not a request site, so you need to try coding, then come back if it didn't work.

1 comment

0

Nah i understand what you mean, i am doing that rn thing is someone said thats how i should do that :/

This discussion is preserved as it was. New answers, comments, and votes are closed.