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 (I know, sounds noobish, but it gets better)

Previous Thread :: Next Thread 
theroadrunner is not online. theroadrunner
Joined: 06 Oct 2010
Total Posts: 862
29 Oct 2013 01:23 PM
I'm trying to get the KeyDown for the esc key.

I tried byte:

MyPlayer:GetMouse().KeyDown:connect(function(key) if (math.byte(key) == 27) then OnMenu() end end)

Didn't even begin OnMenu (a function).

Y U NO WORK
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
29 Oct 2013 01:47 PM
esc is locked for key.byte to prevent tampering with the menu probably.
Report Abuse
theroadrunner is not online. theroadrunner
Joined: 06 Oct 2010
Total Posts: 862
29 Oct 2013 01:50 PM
Darn, was trying to disable reset.

Funny, they made every single coreGui available to be made invisible, except for the menu. >_>
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
29 Oct 2013 01:52 PM
LocalScript

repeat wait(.1) until game.Players.LocalPlayer.Character:FindFirstChild("Body Colors")

game.Players.LocalPlayer.Character.Humanoid.Name = "lel u cant reset"
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
29 Oct 2013 01:53 PM
LocalScript in startergui*
Report Abuse
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
29 Oct 2013 01:53 PM
If they let you remove the menu then you could lockfirstperson and keep people from reporting people
Report Abuse
theroadrunner is not online. theroadrunner
Joined: 06 Oct 2010
Total Posts: 862
29 Oct 2013 01:54 PM
Yes, but wouldn't that damage a weapon?

e.g. Using MyCharacter.Humanoid.Health = bla bla - 10
Report Abuse
TameGamer is not online. TameGamer
Joined: 07 Jul 2012
Total Posts: 112
29 Oct 2013 01:55 PM
I was about to make a stupid response by saying add a while true do and checking if the health is 0 then maxing it out bet then when I thought about that I remembered that the character dies instantly after the health is set to zero. Well, they probably use the :BreakJoints() but anyways, like he said it is probably impossible to disable that menu.
Report Abuse
theroadrunner is not online. theroadrunner
Joined: 06 Oct 2010
Total Posts: 862
29 Oct 2013 01:55 PM
Unless....

I make a value in the character that states that it has an antireset, and the weapon will check for that value before damaging, and instead of firing with

character.Humanoid

It'll do

Character.HAHAHAHA
Report Abuse
theroadrunner is not online. theroadrunner
Joined: 06 Oct 2010
Total Posts: 862
29 Oct 2013 01:56 PM
Thanks Old Goldfish guy, you're a genius!
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
29 Oct 2013 01:58 PM
Rename it to NoReset and edit the humanoid weapon damages to
NoReset:TakeDamage(num)
or
NoReset.Health =NoReset.Health - num
Report Abuse
TameGamer is not online. TameGamer
Joined: 07 Jul 2012
Total Posts: 112
29 Oct 2013 01:59 PM
And on the fact that you said "wouldn't that damage the weapon" I am guessing that you meant that the weapon wouldn't be able to find the Humanoid but all you have to do is a :findFirstChild("lel u cant reset").Health = :findFirstChild("lel u cant reset").Health - 10

Also I just said this but on the script saying change the name of the humanoid probably won't work because they probably use the :BreakJoints() method.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
29 Oct 2013 02:00 PM
Why :findFirstChild(name) when you can just do [name]? And I personally rename it to "Player", but you can put it to what suits you best.
Report Abuse
TameGamer is not online. TameGamer
Joined: 07 Jul 2012
Total Posts: 112
29 Oct 2013 02:03 PM
Because if you do just [name] you can't put spaces well, I don't know if this works but you might be able to put ("lel u cant reset") or ["lel u cant reset"]. I have never tried either of those.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
29 Oct 2013 02:08 PM
Character["Left Arm"]

..?
Report Abuse
TameGamer is not online. TameGamer
Joined: 07 Jul 2012
Total Posts: 112
29 Oct 2013 02:11 PM
I see. I have never done that before. But anyways, I am going to stick with the :findFirstChild("") because it is already stored away in my brain.
Report Abuse
theroadrunner is not online. theroadrunner
Joined: 06 Oct 2010
Total Posts: 862
29 Oct 2013 02:18 PM
I just named it LOLIZOMBIEH.

And it worked. Wow.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
29 Oct 2013 02:19 PM
FindFirstChild is better for some uses, such as if you do not know if a child exists or not (because we TOTALLY need to crash the script when trying to do object.NoneExistantChild instead of returning nil) and for instances whom have the same name as properties (NEVER do that), but instance[string] is much faster to type, and possibly to run.
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