|
| 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 |
|
|
| |
|
Hazania
|
  |
| Joined: 04 Jun 2010 |
| Total Posts: 1344 |
|
| |
|
|
| 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
|
  |
| Joined: 16 May 2009 |
| Total Posts: 14084 |
|
|
| 11 Feb 2014 11:27 PM |
| um is it inside a local script |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 11 Feb 2014 11:51 PM |
Mhm very ironic... Someone HALP!!!! |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2014 11:59 PM |
| Make sure the script is a descendant of the Player or Character. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 12 Feb 2014 12:04 AM |
| Well you never know and I had no other answers... |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 12 Aug 2009 |
| Total Posts: 13737 |
|
|
| 12 Feb 2014 10:25 AM |
@Datastore
then theirs lag :(
xd |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 12 Feb 2014 10:45 AM |
| @Data if keydown "/" doesn't work how come it works in Solo? |
|
|
| Report Abuse |
|
|
|
| 12 Feb 2014 10:48 AM |
| It worked when I changed it to t >:o |
|
|
| Report Abuse |
|
|