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: Can mouse only be accessed from localscripts?

Previous Thread :: Next Thread 
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
26 Sep 2015 08:13 PM
cause if so then remote event time

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
goldbriefs is not online. goldbriefs
Joined: 20 Jun 2014
Total Posts: 36
26 Sep 2015 08:15 PM
Yes.
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
26 Sep 2015 08:16 PM
k

dont see why server cant do :Getmouse but mmk roblox im fine with remote events

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
goldbriefs is not online. goldbriefs
Joined: 20 Jun 2014
Total Posts: 36
26 Sep 2015 08:17 PM
Does the server have a mouse?
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
26 Sep 2015 08:22 PM
getmouse is on a player fam

player:GetMouse()

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
goldbriefs is not online. goldbriefs
Joined: 20 Jun 2014
Total Posts: 36
26 Sep 2015 08:32 PM
Right, but

"dont see why server cant do :Getmouse but mmk roblox im fine with remote events"

I was trying to explain why GetMouse is a client-side method.

Each player has their own mouse -- hence the need for a LocalScript -- but the server doesn't. It wouldn't make sense to get the mouse from the server.
Report Abuse
foreverpower is not online. foreverpower
Joined: 05 Feb 2011
Total Posts: 5578
26 Sep 2015 08:40 PM
Does the server have a mouse? [2]
Report Abuse
morash is not online. morash
Joined: 22 May 2010
Total Posts: 5834
26 Sep 2015 08:41 PM
It might have a mouse actually.
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
26 Sep 2015 08:41 PM
you misunderstood me

i was just wondering if server could be like

hey what is mouse of that player

since mouse is :getmouse, not like uis

but obv you cant so w/e

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
26 Sep 2015 08:42 PM
here are a list of things that I think should always be done client-side

-gui manipulation
-mouse/keyboard related stuffs
-sounds


Red Blossoms
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
26 Sep 2015 08:44 PM
yeah but its for a single player game

so the lines are blurred

w/e tho i just did it with REs so its fine

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
26 Sep 2015 08:44 PM
by lines are blurred i mean that

client and server doing diff things is less important

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
26 Sep 2015 08:46 PM
do everything on the client then, it's not like it doesn't matter if it's replicated or not


Red Blossoms
Report Abuse
TheScripterGeek is not online. TheScripterGeek
Joined: 02 Sep 2012
Total Posts: 1192
26 Sep 2015 08:48 PM
Couldn't you actually get the mouse in a local and then set it as a _G value, and then access it on a server?(local sets variable for mouse, server gets it)
Report Abuse
goldbriefs is not online. goldbriefs
Joined: 20 Jun 2014
Total Posts: 36
26 Sep 2015 08:48 PM
Ah, I see what you meant now.

Anyway, yeah.
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
26 Sep 2015 08:49 PM
@TheScripterGeek

lol try it


Red Blossoms
Report Abuse
goldbriefs is not online. goldbriefs
Joined: 20 Jun 2014
Total Posts: 36
26 Sep 2015 08:50 PM
@TheScripterGeek

That wouldn't work because the global table would only be global to scripts running on the client.
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
26 Sep 2015 08:50 PM
Here are the things wrong with your idea

the _G table between the server and client is different
ex.

--serverscript
_G.dude = "lol hi"

--localscript
print(_G.dude)
>nil

Even if you tried to send the mouse over to the server via remote event, then it would say that mouse is a nil value


Red Blossoms
Report Abuse
TheScripterGeek is not online. TheScripterGeek
Joined: 02 Sep 2012
Total Posts: 1192
26 Sep 2015 08:50 PM
How about we all do it
lol
Report Abuse
foreverpower is not online. foreverpower
Joined: 05 Feb 2011
Total Posts: 5578
26 Sep 2015 08:51 PM
The global table doesn't even replicate.
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
26 Sep 2015 08:51 PM
i heard from some kid that mouse can be passed through remote events

but i doubt it not even sure

lol lets just close this thread im already done

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
TheScripterGeek is not online. TheScripterGeek
Joined: 02 Sep 2012
Total Posts: 1192
26 Sep 2015 08:52 PM
How come when you;
Set the _G value for(or just a regular variable, both work for me somehow) the localplayer,
and it gets the server; ex:
--local
Player = game.Players.LocalPlayer
--server
print(Player)
>TheScripterGeek
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
26 Sep 2015 08:53 PM
Because you are testing it in Studio Play Solo

Use an actual server


Red Blossoms
Report Abuse
TheScripterGeek is not online. TheScripterGeek
Joined: 02 Sep 2012
Total Posts: 1192
26 Sep 2015 08:55 PM
No, I did it on a server via F9
Report Abuse
goldbriefs is not online. goldbriefs
Joined: 20 Jun 2014
Total Posts: 36
26 Sep 2015 08:55 PM
You can pass pretty much anything from the client to the server using RemoteEvents, including the mouse.
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