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

What's an event for when someone presses a "key", on the keyboard?

What's an event for when someone presses a "key", on the keyboard?

2 answers

mouse = game.Players.LocalPlayer:GetMouse()
--Put in localscript in starterpack

mouse.KeyDown:connect(function(key)
if key == "z" then
print("z was pressed")
end
end)

For more on this go here: Here

1 comment

0

Please note: This is not a request site. So this MAY be taken down or you may have to put code in your next question, thank you!

Here you can learn it.

1 comment

0

Ey ppl down voting beacuse they want the entire script. too bad for you.

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