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

Binding 'taken' keys?

How do you bind the '/' and enter key?

-- edit: Actually I haven't tried it, does it work like normal when you disable the chat?

2 comments

0

If chat is disabled, I expect them to work normally.

0

I don't believe that is the case for the backslash, BlueTaslem, unless something has changed between a couple of months ago and now.

1 answer

✓ Accepted answer

I recommend looking into UserInputService events. They are harder to understand than regular mouse events, but it will let you use any key on keyboard as well as some other fancy inputs.

So to bind the '/' key, you could use this script:

inputService = game:GetService("UserInputService")

inputService.InputBegan:connect(function(input)
	if input.UserInputType == Enum.UserInputType.Keyboard then
		if input.KeyCode == Enum.KeyCode.Slash then
			print("/ key has been pressed!")
		end
	end
end)

1 comment

0

Ay, that's what I was looking for, thanks.

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