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 Issues

Previous Thread :: Next Thread 
SuperSniper222 is not online. SuperSniper222
Joined: 09 Jul 2010
Total Posts: 426
24 Oct 2014 02:40 PM

Everything works here, the chairspeed is inserted but, heres my issue

Mouse.KeyDown:connect(function(key) if I press any key it says "Not Working", even if I press W or S.

I've had this plenty of times with KeyDown and I'm not sure what I've been doing wrong.


function Seat(hit)
wait(0.05)
Player = game.Players:GetPlayerFromCharacter(hit.Parent)
if Player then
wait(0.1)
if hit.Parent:findFirstChild("Humanoid") and hit.Parent.Humanoid.Sit == true then
if script.Parent:findFirstChild("ChairSpeed") then return end
elseif not script.Parent:findFirstChild("ChairSpeed") then
local Speed = Instance.new("BodyVelocity", script.Parent)
Speed.Name = "ChairSpeed"
Mouse = Player:GetMouse()
Mouse.KeyDown:connect(function(key)
key = key:lower()
if key == "w" then
Speed.P = 2500
elseif key == "s" then
Speed.P = 0
else
print("Not Working")
end
end)
end
end
end

script.Parent.Touched:connect(Seat)
Report Abuse
YOSkater is not online. YOSkater
Joined: 19 Mar 2011
Total Posts: 13337
24 Oct 2014 02:56 PM
w is a key that already has a designated job
try q or e
Report Abuse
YOSkater is not online. YOSkater
Joined: 19 Mar 2011
Total Posts: 13337
24 Oct 2014 02:57 PM
keys you can't use:

i, o, w, a, s, d
Report Abuse
SuperSniper222 is not online. SuperSniper222
Joined: 09 Jul 2010
Total Posts: 426
24 Oct 2014 03:09 PM
Tried e and q same result.
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