VitimanA
|
  |
| Joined: 04 Apr 2008 |
| Total Posts: 869 |
|
|
| 05 Jan 2012 06:57 PM |
| how do i tell where the position of my mouse cursor is; i forgot :( |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 05 Jan 2012 07:09 PM |
You need to use a textbutton
textbutton.MouseEnter:connect(function(x,y) print(x,y) end)
<'+1 Post. Ujelly?'> |
|
|
| Report Abuse |
|
|
xvgigakid
|
  |
| Joined: 22 Jun 2008 |
| Total Posts: 4407 |
|
|
| 05 Jan 2012 07:13 PM |
'You need to use a textbutton' 'you need' 'NEED, TEXTBUTTON'
You could use a Frame, TextLabel, ImageLabel, TextBox, ImageButton, etc... And I wouldn't recommend MouseEnter. Use MouseMoved.
textbutton.MouseMoved:connect(function(x,y) print(x..","..y) --I just prefer being able to see the comma :/ end) |
|
|
| Report Abuse |
|
|
C0D3Y
|
  |
| Joined: 24 Jul 2010 |
| Total Posts: 1692 |
|
|
| 05 Jan 2012 07:25 PM |
No you don't... print(Mouse.Hit) |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 05 Jan 2012 08:46 PM |
xv, forgot that frames, textlabels, etc. could use the MouseMoved event.
<'+1 Post. Ujelly?'> |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 05 Jan 2012 08:50 PM |
Eh, and it should be
textbutton.MouseMovedconnect(function(x,y) print(x,y) end)
My bad. Feeling light headed today, can't really think straight.
@Other poster, about the mouse.Hit; Doesn't that return a CFrame? Thought OP meant screen pixel position.
<'+1 Post. Ujelly?'> |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 05 Jan 2012 08:52 PM |
script.Parent.Selected:connect(function(mouse) print(mouse.Hit); end ) |
|
|
| Report Abuse |
|
|