NOTE : this is not a gui button this is for something else
I just need to kow the key:byte id/code for left mouse button / mouse button 1
heres my script
player = game.Players.LocalPlayer mouse = player:GetMouse() mouse.KeyDown:connect(function(key) if key:byte() == 1 then print'u wot m8' end end)
local player = game.Players.LocalPlayer local mouse = player:GetMouse() mouse.Button1Down:connect(function() --stuff end)
ForeverDev didn't mention it, but key presses on a keyboard have KeyCodes associated with them because of letter encodings, not because of a generic input ID. Mouse events use their own, well, events.
By the way, I suggest reasearching and using the UserInputService instead of GetMouse for most things. You don't get the problem of KeyDown reserving keys, and you get more flexibility in the form of the Function buttons and the separation of '2' and 'LeftShift'