What's the function for Keydown (where you hold a key down and it functions) Example: K > New Part
✓ ANSWER ACCEPTED
what's the code for Keydown function?
1 answer
✓ Accepted answer
It needs to be in a local script in StarterGui or StarterPack
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
Mouse.KeyDown:connect(function(Key)
if Key == "k" then
Instance.new("Part",game.Workspace)--Put here what you want to happen when the key is pressed
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Thanks!