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

How do I use the mouse? [closed]

Asked by 10 years ago

This question already has an answer here:

How to get mouse without using a tool

How to do a right click and left click mouseclick?

Marked as Duplicate by evaera

This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 10 years ago

To get the mouse use this in a localscript or do the normal tool way:

m = game.Players.LocalPlayer:GetMouse()

The way to use the left button is:

m.Button1Down:connect(function()
print("Left button was clicked")
end)

Right:

m.Button2Down:connect(function()
print("Right button was clicked")
end)

I hope this helped :)

Ad