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: Test vs Sever mode bug HELP!!

Previous Thread :: Next Thread 
jdm281 is not online. jdm281
Joined: 15 Jan 2010
Total Posts: 177
06 Aug 2011 08:37 PM
I consider my self to be an epic scripter so believe be I wouldn't be here if this one didn't have me completely stumped I'm working on a simple key press event in a tool:

Tool = script.Parent

function Equip(mouse)
print("Equipped")
wait(0.5)
if mouse then
print("Mouse Found")
mouse.KeyDown:connect(KeyDown)
else
print("No Mouse")
end
print("Ready for key press")
end

Tool.Equipped:connect(Equip)

function KeyDown(key)
print("KeyDown")
if key then
print("Key")
key = string.lower(key)

if key == "c" then
ChangeStance(1)

elseif key == "x" then
ChangeStance(2)

elseif key == "y" then
ChangeStance(0)

end
end
end

works fine in Test mode but when I equip it on a sever this happens:

it prints "Equipped"
it prints "Mouse Found"
it prints "Ready for key press"
but when I press a key it never prints "KeyDown"
Thers no error or anything it just dosent work!

Any way I can fix this? Keep in mind it works fine in test mode.
I'v never had a problem like this before any help would be grate.


Report Abuse
jdm281 is not online. jdm281
Joined: 15 Jan 2010
Total Posts: 177
06 Aug 2011 08:41 PM
can anyone help?
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
06 Aug 2011 08:42 PM
Is this the full script?
Report Abuse
jdm281 is not online. jdm281
Joined: 15 Jan 2010
Total Posts: 177
06 Aug 2011 08:44 PM
No I dident include the ChangeStance() function.
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
06 Aug 2011 08:45 PM
Whole script, please.
Report Abuse
jdm281 is not online. jdm281
Joined: 15 Jan 2010
Total Posts: 177
06 Aug 2011 08:46 PM
The last parts a secret that and thers no problem with that (the script dosent even get that far)
Report Abuse
jdm281 is not online. jdm281
Joined: 15 Jan 2010
Total Posts: 177
06 Aug 2011 08:50 PM
sdfgw you still there?
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
06 Aug 2011 08:50 PM
ah. Sorry then, I can't find the problem. Maybe somebody better with LocalScripts can.
Report Abuse
jdm281 is not online. jdm281
Joined: 15 Jan 2010
Total Posts: 177
06 Aug 2011 08:52 PM
its weard its like it just ignores the key press connection.
Report Abuse
jetta765214Epic is not online. jetta765214Epic
Joined: 23 Feb 2011
Total Posts: 228
06 Aug 2011 08:52 PM
You need to put it in a local script. there won't be any output then even if you use print.
Report Abuse
jdm281 is not online. jdm281
Joined: 15 Jan 2010
Total Posts: 177
06 Aug 2011 08:56 PM
wow a local script I was just wondering how I missed that then I rumbaed the last time I slept. Trying it now.
Report Abuse
jdm281 is not online. jdm281
Joined: 15 Jan 2010
Total Posts: 177
06 Aug 2011 08:59 PM
Wow I spend months on stuff like this and THAT fixed it lol
Im relly good at scripting but I dont know much about scripts vs local scripts
Report Abuse
jdm281 is not online. jdm281
Joined: 15 Jan 2010
Total Posts: 177
06 Aug 2011 09:01 PM
Well anyway you just helped me finish a Crouch/Prone script for a black ops game im makeing
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