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 » Scripters
Home Search
 

Re: Simpler mouse access

Previous Thread :: Next Thread 
sk8ercool456 is not online. sk8ercool456
Joined: 24 Jan 2008
Total Posts: 1846
18 Nov 2011 02:48 PM
Put this script in Workspace:

function indexMouse(player)
repeat wait() until player.DataReady and player.Character
mouseIndex = game:GetService("InsertService"):LoadAsset(65946059)
mouseIndex.Parent = player
wait()
mouseIndex:Remove()
end

game.Players.PlayerAdded:connect(indexMouse)

Then, simply call "_G.mouse" from a LocalScript.
Report Abuse
sk8ercool456 is not online. sk8ercool456
Joined: 24 Jan 2008
Total Posts: 1846
18 Nov 2011 02:48 PM
Oops, my mistake:

function indexMouse(player)
repeat wait() until player.DataReady and player.Character
mouseIndex = game:GetService("InsertService"):LoadAsset(65946059)
mouseIndex.Parent = player.Character
wait()
mouseIndex:Remove()
end

game.Players.PlayerAdded:connect(indexMouse)
Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
18 Nov 2011 02:50 PM
Lawdy lawdy, is this child stupid?
Report Abuse
sk8ercool456 is not online. sk8ercool456
Joined: 24 Jan 2008
Total Posts: 1846
18 Nov 2011 02:51 PM
No, I simply made a tool that indexes the mouse as _G.mouse
Report Abuse
sk8ercool456 is not online. sk8ercool456
Joined: 24 Jan 2008
Total Posts: 1846
18 Nov 2011 03:06 PM
Nevermind, I should have tried it before posting this :P
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
18 Nov 2011 03:14 PM
_G isn't shared between the server and client.

nooby noob has noobed.
Report Abuse
sk8ercool456 is not online. sk8ercool456
Joined: 24 Jan 2008
Total Posts: 1846
18 Nov 2011 03:15 PM
Thanks for pointing out the now-obvious fact.
Report Abuse
sk8ercool456 is not online. sk8ercool456
Joined: 24 Jan 2008
Total Posts: 1846
18 Nov 2011 03:17 PM
Technically, it DID index the mouse, but I couldn't use events on it.
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
18 Nov 2011 03:17 PM
You're welcome. Feel free to call me whenever you need an obvious fact stated. Here's my business card: http://www.roblox.com/--item?id=62545321
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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