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: Tool keypress event and how to manipulate limbs

Previous Thread :: Next Thread 
UndeleteTool is not online. UndeleteTool
Joined: 15 Mar 2012
Total Posts: 1851
22 Dec 2012 10:36 AM
I was wondering too things, both of them centre around tools (not hopperbins!)
How could I make a tool do something when the C key was pressed (don't tell me it isn't possible, because reload and crouch buttons on weapon tools work).

Also, if I wanted to swing an arm (the arm, not the tool grip) how would I do this with a script?

Thanks in advance
Report Abuse
crouton04 is not online. crouton04
Joined: 07 Jul 2010
Total Posts: 4459
22 Dec 2012 10:37 AM
Anchor the arm, and change it's cframe. :p
Report Abuse
UndeleteTool is not online. UndeleteTool
Joined: 15 Mar 2012
Total Posts: 1851
22 Dec 2012 10:38 AM
Thanks crouton I'll try that,
Does anyone know how to do the keypress with a tool?
Report Abuse
builderman1171 is not online. builderman1171
Joined: 27 Mar 2010
Total Posts: 1595
22 Dec 2012 10:40 AM
mouse.KeyDown:connect(function(key)
print(key)
end)

Make sure you define mouse and all.
Report Abuse
crouton04 is not online. crouton04
Joined: 07 Jul 2010
Total Posts: 4459
22 Dec 2012 10:41 AM
LOL

player = script.Parent.Parent:GetPlayerFromCharacter(script.Parent.Parent)
mouse = player:GetMouse()

mouse.KeyDown:connect(function (key)
print(key)
end)
Report Abuse
FreeToTake is not online. FreeToTake
Joined: 21 Apr 2010
Total Posts: 1827
22 Dec 2012 10:44 AM
to swing an arm
shoulder.DesiredAngle = math.pi
Report Abuse
UndeleteTool is not online. UndeleteTool
Joined: 15 Mar 2012
Total Posts: 1851
22 Dec 2012 10:50 AM
GetPlayerFromCharacter is not a valid member of model (the model for my player).
Do you have to do it from humanoid or something?
Report Abuse
crouton04 is not online. crouton04
Joined: 07 Jul 2010
Total Posts: 4459
22 Dec 2012 10:58 AM
do player = game.Players.LocalPlayer put the script in a local script
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