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: KeyDown help

Previous Thread :: Next Thread 
Waffloid is not online. Waffloid
Joined: 14 Jul 2011
Total Posts: 1606
31 May 2014 12:13 PM
This script works fine in solo mode. There are no errors in the output, but it would seem that the connect is broken when it is not in solo, and I have no idea why.

Please, please help!

ID = 1000
trigger = "b"
function onKey(key)
key = key:lower()
if key == trigger then
script.heistStart:Fire()
print(trigger.."WAS PRESSED, YOU GUYS")
randMask = math.random(1,4)
storage = game.ServerStorage
mask = {storage.Mask01,storage.Mask02,storage.Mask03,storage.Mask04}
rMask = mask[randMask]:clone()
v = script.Parent.Parent.Parent.Parent
rMask.Parent = v.Character
if game:GetService("GamePassService"):PlayerHasPass(v,ID) then
local Classy = game.ServerStorage.ClassyGun
Classy:clone().Parent = v.Backpack
print("Mmm, Classy.")
script.Parent.Parent:Destroy()
else
local Normal = game.ServerStorage.NormalGun
Normal:clone().Parent = v.Backpack
script.Parent.Parent:Destroy()
end
end
end
script.Parent.Parent.Parent.Parent:GetMouse().KeyDown:connect(onKey)
Report Abuse
Waffloid is not online. Waffloid
Joined: 14 Jul 2011
Total Posts: 1606
31 May 2014 12:44 PM
bump.. pls
Report Abuse
Waffloid is not online. Waffloid
Joined: 14 Jul 2011
Total Posts: 1606
31 May 2014 01:37 PM
someone?!
Report Abuse
Waffloid is not online. Waffloid
Joined: 14 Jul 2011
Total Posts: 1606
31 May 2014 04:31 PM
k srsly
Report Abuse
Aisoc is not online. Aisoc
Joined: 08 Jun 2013
Total Posts: 412
31 May 2014 04:35 PM
output please
Report Abuse
Waffloid is not online. Waffloid
Joined: 14 Jul 2011
Total Posts: 1606
01 Jun 2014 02:23 AM
Nothing in the output, the event only fires in solo mode. :\
Report Abuse
oscaroshkosh is not online. oscaroshkosh
Joined: 13 Apr 2012
Total Posts: 331
01 Jun 2014 02:26 AM
Are you using a local script?
Report Abuse
Waffloid is not online. Waffloid
Joined: 14 Jul 2011
Total Posts: 1606
01 Jun 2014 03:39 AM
Nope.
Report Abuse
oscaroshkosh is not online. oscaroshkosh
Joined: 13 Apr 2012
Total Posts: 331
01 Jun 2014 03:44 AM
Put it in a local script.
Report Abuse
Waffloid is not online. Waffloid
Joined: 14 Jul 2011
Total Posts: 1606
01 Jun 2014 03:58 AM
I tried it, it didn't work.
Report Abuse
Waffloid is not online. Waffloid
Joined: 14 Jul 2011
Total Posts: 1606
03 Jun 2014 05:29 AM
I fixed it!

–I'm not crazy, the voices in my head said so!-
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