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: Tools

Previous Thread :: Next Thread 
CaptainSandbox is not online. CaptainSandbox
Joined: 08 Oct 2012
Total Posts: 908
29 Nov 2012 02:56 PM
How would I make this (Not for a hopperbin btw, If it matters)

(This is my failure, I have almost no idea what to do)

if KeyDown == "r" then
print("NubCaik")
elseif KeyDown == "p" then
print("Double nub caik")
end
Report Abuse
Monkey727 is not online. Monkey727
Joined: 12 Jan 2009
Total Posts: 969
29 Nov 2012 03:01 PM

script.Parent.Equipped:connect(function(mouse)
mouse.KeyDown(function(key)

if key == "r" then
print("NubCaik")
elseif key == "p" then
print("Double nub caik")
end

end)
end)

I think
Report Abuse
Monkey727 is not online. Monkey727
Joined: 12 Jan 2009
Total Posts: 969
29 Nov 2012 03:01 PM
Oops, :connect after that KeyDown :P
Report Abuse
zoomypie2 is not online. zoomypie2
Joined: 25 Oct 2011
Total Posts: 8050
29 Nov 2012 03:07 PM
Wrong, sorry :P

function onKeyDown(key)
key:lower()
if key == "r"

:D
Report Abuse
Monkey727 is not online. Monkey727
Joined: 12 Jan 2009
Total Posts: 969
29 Nov 2012 03:09 PM
You mean
key = key:lower()

And it would still work.. That just means it ignores capitals.
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
29 Nov 2012 03:33 PM
@zoomy
I need to advise you again, leave.

- thedestroyer115
Report Abuse
CaptainSandbox is not online. CaptainSandbox
Joined: 08 Oct 2012
Total Posts: 908
29 Nov 2012 05:33 PM
script.Parent.Equipped:connect(function(mouse)
mouse.KeyDown:connect(function(key)

if key == "r" then
print("NubCaik")
elseif key == "p" then
print("Double nub caik")
end

end)
end)

Like this?

(Sorry for late reply, Was busy)
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
29 Nov 2012 06:25 PM
That'd work. Make sure it is in a localscript though.

- thedestroyer115
Report Abuse
CaptainSandbox is not online. CaptainSandbox
Joined: 08 Oct 2012
Total Posts: 908
29 Nov 2012 06:30 PM
Its not a local script and works?

Is there a reason to change it?
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
29 Nov 2012 06:32 PM
Are you doing Tools/Test/Play Solo ?? It will work there, because that is all client. If you test it in regular servers it will break. Test it for yourself.

Change it to LocalScript.

- thedestroyer115
Report Abuse
CaptainSandbox is not online. CaptainSandbox
Joined: 08 Oct 2012
Total Posts: 908
29 Nov 2012 06:38 PM
Thanks :)
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
29 Nov 2012 06:39 PM
Welcome.

- thedestroyer115
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
29 Nov 2012 06:41 PM
Btw, you seem like an alright person. I wouldn't mind you sending me a friend request. I would gladly accept.

- thedestroyer115
Report Abuse
CaptainSandbox is not online. CaptainSandbox
Joined: 08 Oct 2012
Total Posts: 908
29 Nov 2012 06:46 PM
if Accept ~= nil then
site.More.People.thedestroyer115.Friends.Add = Add.new("CaptainSandbox")
end


:3
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