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 » Scripters
Home Search
 

Re: When space pressed script needed.

Previous Thread :: Next Thread 
Burglered is not online. Burglered
Joined: 14 Jul 2011
Total Posts: 962
18 Oct 2015 07:34 PM
I haven't coded on roblox in a while and I forgot how to do key down stuff.
Report Abuse
BusyCityGuy is not online. BusyCityGuy
Joined: 17 Aug 2012
Total Posts: 2144
18 Oct 2015 07:37 PM
1. http://wiki.roblox.com/?title=API:Class/UserInputService
2. http://wiki.roblox.com/index.php?title=API:Class/UserInputService/InputBegan

Or you could use Mouse.KeyDown which is what you're probably used to.

-The [Guy]
Report Abuse
Burglered is not online. Burglered
Joined: 14 Jul 2011
Total Posts: 962
18 Oct 2015 07:44 PM
Could I use key:lower or something
Report Abuse
airstriker4 is not online. airstriker4
Joined: 27 Jul 2012
Total Posts: 5831
18 Oct 2015 07:45 PM
please explain how you are supposed to get the lowercase version of spacebar
Report Abuse
Burglered is not online. Burglered
Joined: 14 Jul 2011
Total Posts: 962
18 Oct 2015 07:46 PM
Facepalm
Report Abuse
Burglered is not online. Burglered
Joined: 14 Jul 2011
Total Posts: 962
18 Oct 2015 07:46 PM
Im talking about if the space is pressed(lowered, dropped, pressed, smashed)
Report Abuse
airstriker4 is not online. airstriker4
Joined: 27 Jul 2012
Total Posts: 5831
18 Oct 2015 07:47 PM
that's not what :lower() does lol
Report Abuse
Burglered is not online. Burglered
Joined: 14 Jul 2011
Total Posts: 962
18 Oct 2015 07:49 PM
Plz hlp cri. When space is pressed I want to set 'off' to 'true'

local off = true
local rotate = script.Parent.Rotation
db = true

if off == false and db == true then
db=false
wait(.2)
for i=90,310,10 do
rotate = i
end
for a=315,145,-10 do
rotate = a
end
end
Report Abuse
airstriker4 is not online. airstriker4
Joined: 27 Jul 2012
Total Posts: 5831
18 Oct 2015 07:50 PM
the one guy gave you all the resources you need, you should be able to implement it yourself
Report Abuse
invalidinvoke is not online. invalidinvoke
Joined: 25 Mar 2010
Total Posts: 142
18 Oct 2015 07:53 PM
:lower() is for strings, lol.
Anyways.
local UserInputService = game:GetService("UserInputService");

UserInputService.InputBegan:connect(function(input, process)
if input.UserInputType == Enum.UserInputType.Keyboard then
if input.KeyCode == Enum.Space.KeyCode then
print("Space pressed.");
off = true;
end
end
end)
Report Abuse
Burglered is not online. Burglered
Joined: 14 Jul 2011
Total Posts: 962
18 Oct 2015 08:00 PM
omg thank you. Im not that good a scripting so I can't really do it my self.
Report Abuse
Burglered is not online. Burglered
Joined: 14 Jul 2011
Total Posts: 962
18 Oct 2015 08:02 PM
Btw, It says Space is noot a valid EnumItem
Report Abuse
invalidinvoke is not online. invalidinvoke
Joined: 25 Mar 2010
Total Posts: 142
18 Oct 2015 08:05 PM
Oops. Should be Enum.KeyCode.Space
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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