key = string.upper(key)
if key == "MouseLeftClick" then -- i dont know what the name of the mouse click the key
✓ ANSWER ACCEPTED
How do i use a mouse click as a Keycode?
1 answer
✓ Accepted answer
Hey there, to detect input use UserInputService, and to detect LeftClick through that, heres how u do it :
local userInputService = game:GetService('UserInputService')
userInputService.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
I don't think the mouse has keycodes. Correct me if I'm wrong.