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

Is it posible to detect where someone has clicked?

Asked by 10 years ago

I would like to know if it is possible to detect where someone clicked , and if it is possible then I would like to know how

2 answers

Log in to vote
3
Answered by 10 years ago

Yes, it is.

1--Assuming this is a local script inside of StarterGui
2 
3local player = game.Players.LocalPlayer
4local mouse = player:GetMouse()
5 
6mouse.Button1Down:connect(function()
7print(mouse.Hit.p) --mouse.Hit.p returns the position of the mouse
8end)
0
Thanks! chill22518 145 — 10y
0
No problem aquathorn321 858 — 10y
Ad
Log in to vote
-9
Answered by 10 years ago

No, it is impossible to detect when someone has click.

0
Tried it and it don't work iBrownz 0 — 10y
0
You could do it locally. Redbullusa 1580 — 10y

Answer this question