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: Press any key to being.

Previous Thread :: Next Thread 
sodaghost13 is not online. sodaghost13
Joined: 18 Apr 2014
Total Posts: 49
16 May 2017 03:19 PM
function onKeyPress(inputObject, gameProcessedEvent)
if inputObject.KeyCode == Enum.KeyCode.Tab then
pcall(function()
StarterGui:SetCore('TopbarEnabled', true)
end)
end
end
game:GetService('UserInputService').InputBegan:connect(onKeyPress)

What do you put if you want it to be any given key including the mouse?


#Sodaghost13
Report Abuse
DevJoas is not online. DevJoas
Joined: 17 Dec 2014
Total Posts: 627
16 May 2017 03:19 PM
Remove the if?

Do you know what you are doing?
Report Abuse
sodaghost13 is not online. sodaghost13
Joined: 18 Apr 2014
Total Posts: 49
16 May 2017 03:22 PM
Yeah, I've tried that but I remember doing it once by accident with the if but I can't remember how I did it.


#Sodaghost13
Report Abuse
DevJoas is not online. DevJoas
Joined: 17 Dec 2014
Total Posts: 627
16 May 2017 03:23 PM
My original answer is incorrect...
Report Abuse
DevJoas is not online. DevJoas
Joined: 17 Dec 2014
Total Posts: 627
16 May 2017 03:24 PM
Read:

wiki.roblox.com/index.php?title=API:Class/UserInputService

wiki.roblox.com/index.php?title=API:Class/UserInputService/InputBegan

And you should know how to do what you want to do
Report Abuse
sodaghost13 is not online. sodaghost13
Joined: 18 Apr 2014
Total Posts: 49
16 May 2017 03:25 PM
Yet again, I've resolved in making that mistake again! Another script was disabled temporarily which couldn't call it :/

This had no point lol


#Sodaghost13
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