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: Why wont this work?

Previous Thread :: Next Thread 
SomaIia is not online. SomaIia
Joined: 06 Feb 2014
Total Posts: 102
19 Feb 2014 06:24 PM
Note: mouse is define with :GetMouse(), icon and inv are defined already.

local function onKeyDown()
if key == "g" and icon.Visible == true then
inv.Visible = true

elseif key == "g" and
inv.Visible == true then
inv.Visible = not inv.Visible
end
end
mouse.KeyDown:connect(onKeyDown)
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
19 Feb 2014 06:26 PM
Put

repeat wait(2) until game.Players.LocalPlayer.Character:FindFirstChild("Body Colors")

At the top
Report Abuse
jbjgang2 is not online. jbjgang2
Joined: 07 Feb 2010
Total Posts: 8948
19 Feb 2014 06:28 PM
@old

i hope you realize i understand scripting and i know that wont work

Swaggin' since 2010
Report Abuse
jbjgang2 is not online. jbjgang2
Joined: 07 Feb 2010
Total Posts: 8948
19 Feb 2014 06:29 PM
btw guys im Somalia

i fixed this script with this:

local function onKeyDown(key)
key:lower()
if key == "g" and icon.Visible == true then
inv.Visible = true

elseif key == "g" and
inv.Visible == true then
inv.Visible = not inv.Visible
end
end
mouse.KeyDown:connect(onKeyDown)

Swaggin' since 2010
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
19 Feb 2014 06:29 PM
It will.
LocalScripts don't register the first time cuz getmouse
It works for me.
Learn to script before you start arguments
Report Abuse
L0cky2013 is not online. L0cky2013
Joined: 30 Jul 2012
Total Posts: 1446
19 Feb 2014 06:29 PM
i smell sALT
Report Abuse
L0cky2013 is not online. L0cky2013
Joined: 30 Jul 2012
Total Posts: 1446
19 Feb 2014 06:30 PM
you cant just do key:lower()

if key:lower() == "g" and icon.Visible == true then
Report Abuse
L0cky2013 is not online. L0cky2013
Joined: 30 Jul 2012
Total Posts: 1446
19 Feb 2014 06:30 PM
Well, I didn't think you could... My bad.
Report Abuse
SomaIia is not online. SomaIia
Joined: 06 Feb 2014
Total Posts: 102
19 Feb 2014 09:12 PM
@Old

even if it does work it is an unproffesional way of doing it
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