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: Localscript not working in Online mode. Only works in Solo

Previous Thread :: Next Thread 
Crazy010517 is not online. Crazy010517
Joined: 17 Sep 2011
Total Posts: 1161
11 Feb 2014 11:04 PM
I have a local script that is suppose to let you type in a textbox when you press "/" but for some reason, it only works in Solo mode D:
Report Abuse
Crazy010517 is not online. Crazy010517
Joined: 17 Sep 2011
Total Posts: 1161
11 Feb 2014 11:14 PM
Bump
Report Abuse
Hazania is not online. Hazania
Joined: 04 Jun 2010
Total Posts: 1344
11 Feb 2014 11:16 PM
Can we see duh script?
Report Abuse
Crazy010517 is not online. Crazy010517
Joined: 17 Sep 2011
Total Posts: 1161
11 Feb 2014 11:23 PM
mouse = game.Players.LocalPlayer:GetMouse()

mouse.KeyDown:connect(function(key)
if key:byte() == 47 then --47 is "/"
script.Parent:CaptureFocus() -- let's assume the script's parent is a textbox
end
end)
Report Abuse
robotmega is not online. robotmega
Joined: 16 May 2009
Total Posts: 14084
11 Feb 2014 11:27 PM
um is it inside a local script
Report Abuse
Hazania is not online. Hazania
Joined: 04 Jun 2010
Total Posts: 1344
11 Feb 2014 11:27 PM
If it's for a key will GetMouse() still work? I wouldn't know because I've never used GetMouse()
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
11 Feb 2014 11:30 PM
yes it does work,and its a localscript,and theres no errors,but for some reason(apparently) not working in online
Report Abuse
Hazania is not online. Hazania
Joined: 04 Jun 2010
Total Posts: 1344
11 Feb 2014 11:35 PM
Honestly, I really don't see what could be wrong, same problem I've run into with my own script. Ironic eh?
Report Abuse
Crazy010517 is not online. Crazy010517
Joined: 17 Sep 2011
Total Posts: 1161
11 Feb 2014 11:51 PM
Mhm very ironic...
Someone HALP!!!!
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
11 Feb 2014 11:59 PM
Make sure the script is a descendant of the Player or Character.
Report Abuse
Hazania is not online. Hazania
Joined: 04 Jun 2010
Total Posts: 1344
12 Feb 2014 12:02 AM
Although could very well be the answer I'm pretty sure he was intelligent enough to check that before posting lol.
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
12 Feb 2014 12:04 AM
Well you never know and I had no other answers...
Report Abuse
Crazy010517 is not online. Crazy010517
Joined: 17 Sep 2011
Total Posts: 1161
12 Feb 2014 12:15 AM
Okay, let's make this clear, it IS a LOCALSCRIPT inside a textbox inside a frame inside a screengui inside startergui.
It works in solo mode but not online.
Report Abuse
nosyliam is not online. nosyliam
Joined: 29 Jan 2010
Total Posts: 901
12 Feb 2014 12:20 AM
try shift + "/"

also

try making a message when the key is clicked
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
12 Feb 2014 12:21 AM
Roblox can be weird at times...

put

wait()
at the top.... That sometimes fixes this.

Also try
repeat wait() until Game.Players.LocalPlayer
if just wait will not work.
Report Abuse
robotmega is not online. robotmega
Joined: 16 May 2009
Total Posts: 14084
12 Feb 2014 12:23 AM
repeat repeat repeat wait(1/0) until game until game.Players until game.Players.LocalPlayer
Report Abuse
M39a9am3R is not online. M39a9am3R
Joined: 10 Nov 2012
Total Posts: 1933
12 Feb 2014 04:38 AM
Have you disabled ROBLOX's Core Gui for chat? If not then / is reserved for chatting.
Report Abuse
GOLDC3PO is not online. GOLDC3PO
Joined: 31 May 2011
Total Posts: 509
12 Feb 2014 07:24 AM
Localscripts must be in a players backpack playergui or character to work unless in solo mode all local scripts are detected
Report Abuse
filiptibell is not online. filiptibell
Joined: 10 Mar 2013
Total Posts: 2362
12 Feb 2014 07:46 AM
I think the "/" key is disabled even if the chat CoreGui is disabled too.
There was a thread about this a couple days ago, the OP had to change the chat key instead.
Report Abuse
EcIiptic is not online. EcIiptic
Joined: 12 Aug 2009
Total Posts: 13737
12 Feb 2014 09:27 AM
>inside startergui


try putting it in the player's playergui when they join.
Report Abuse
DataStore is not online. DataStore
Joined: 07 Feb 2012
Total Posts: 8540
12 Feb 2014 09:47 AM
As someone else pointed out (and unless ROBLOX changed it), the '/' won't trigger the KeyDown event regardless of whether or not the original chat GUI is disabled. To get around this use the KeyUp event. Whilst this can cause issues in itself, it's still a valid workaround for the time being.
Report Abuse
EcIiptic is not online. EcIiptic
Joined: 12 Aug 2009
Total Posts: 13737
12 Feb 2014 10:25 AM
@Datastore


then theirs lag :(

xd
Report Abuse
duckwit is not online. duckwit
Joined: 08 Aug 2008
Total Posts: 1310
12 Feb 2014 10:28 AM
Only if they hold the key down and wait, expecting it to come up while they're holding it down...
Report Abuse
Crazy010517 is not online. Crazy010517
Joined: 17 Sep 2011
Total Posts: 1161
12 Feb 2014 10:45 AM
@Data if keydown "/" doesn't work how come it works in Solo?
Report Abuse
Crazy010517 is not online. Crazy010517
Joined: 17 Sep 2011
Total Posts: 1161
12 Feb 2014 10:48 AM
It worked when I changed it to t >:o
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