generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: mouse

Previous Thread :: Next Thread 
VitimanA is not online. 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 is not online. 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 is not online. 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 is not online. C0D3Y
Joined: 24 Jul 2010
Total Posts: 1692
05 Jan 2012 07:25 PM
No you don't...
print(Mouse.Hit)
Report Abuse
nate890 is not online. 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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image