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

How can I make the User UserInputService grab the "e" button? Any tutorials?

1 answer

This would actually fall into using the Mouse and PlayerMouse properties instead of UserInputService.

Here is some sample code that prints the key pressed to the output: (note: it must be placed inside a LocalScript, which in turn is placed inside of the StarterGui)

local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()

mouse.KeyDown:connect(function(key)
	print(key)
end)

--Written off the top of my head, may or may not work.

1 comment

1

thanks ill try this but wait where do I put the key I want people to have to press?

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