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: Saving the mouse to an ObjectValue?

Previous Thread :: Next Thread 
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
01 Jan 2012 10:07 PM
I needed two scripts to share a mouse, one can get it and the other can't, so I used an ObjectValue. It worked fine when I did Test>Play Solo, but when I'm doing it in Play mode it's not working. Are you able to do this on a server, or do I have to use _G?
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
01 Jan 2012 10:37 PM
Bump.
Report Abuse
xSIXxStorage is not online. xSIXxStorage
Joined: 22 Aug 2010
Total Posts: 1811
01 Jan 2012 10:42 PM
Impossible, trust me I have tried about 100 ways of doing this and they all failed.
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
01 Jan 2012 10:43 PM
"Are you able to do this on a server, or do I have to use _G?"

Even _G wouldn't work.

Trust me, there's probably no way at all to do it.
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
01 Jan 2012 10:48 PM
Damn it...
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
01 Jan 2012 10:51 PM
Wait.. blobbyblob did it, I think.
Report Abuse
WildSurvival is not online. WildSurvival
Joined: 02 Mar 2009
Total Posts: 511
01 Jan 2012 10:56 PM
I have passed my mouse to another script in the beginning of my scrolling RPG. I made a global function in the gui script called _G.KeyDown and _G.MouseDown and the Up versions of these functions. When pressed it calls the function and the keys are added to a table and the mouse is sent to a variable and a boolean of whether the mouse is down or not is updated. If anyone wants these functions just post.
Report Abuse
WildSurvival is not online. WildSurvival
Joined: 02 Mar 2009
Total Posts: 511
01 Jan 2012 10:57 PM
Even though it wouldnt be too hard to remake them.
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
01 Jan 2012 10:59 PM
^

Ah, good idea! Thanks
Report Abuse
WildSurvival is not online. WildSurvival
Joined: 02 Mar 2009
Total Posts: 511
01 Jan 2012 11:03 PM
No problem :P
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
10 Jan 2012 04:40 PM
print(_G[script.Parent.Parent.Parent.Parent.Parent.Name.."Mouse"]().Name) --prints "Instance"
_G[script.Parent.Parent.Parent.Parent.Parent.Name.."Mouse"]().KeyDown:connect(function(key)
print("IN IT") --Does not print


What is this?
Report Abuse
Techboy6601 is not online. Techboy6601
Joined: 29 Jun 2009
Total Posts: 4914
10 Jan 2012 05:09 PM
I don't even...



~ 10 chicken goto 20 wing ~
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
10 Jan 2012 05:24 PM
Never mind, I got it to work. I just needed to put it in a LocaLscript.
Report Abuse
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
10 Jan 2012 09:40 PM
I did it with an ObjectValue, and it's quite easy. You just need a LocalScript. I suppose _G works just as well though.
Report Abuse
stravant is not online. stravant
Forum Moderator
Joined: 22 Oct 2007
Total Posts: 2893
10 Jan 2012 09:48 PM
You can see an example of me doing this on my "Cn V" tests place. it does everything 100% on the server and it has a "Replicator" localscript in a tool that sends all the events to the server via boolvalue/objectvalue/vector3value changes.

It makes it have a bit of a delay but if there's a lot of global state it's unfortunately the only reasonable way to do things.
Report Abuse
HeckBlock is not online. HeckBlock
Joined: 09 Jan 2012
Total Posts: 36
11 Jan 2012 06:58 AM
I thought i saw a place that did this? its not impossible or easy..
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