Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Does the 'Mouse' object still work?

Asked by
ultrabug 306 Moderation Voter
9 years ago

I've noticed lately that the mouse object isn't working for me in any way. Here is a way I have been using it just in case I have simply been using it completely wrong.

local mouse=game.Players.LocalPlayer:GetMouse()
mouse.KeyDown:connect(function(key)
    if key=="M" then
        print'The M key has been pressed!'
    end
end)

Anyways, just curious.

Answer this question