|
| 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
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
|
| 22 Dec 2012 10:37 AM |
| Anchor the arm, and change it's cframe. :p |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 22 Dec 2012 10:40 AM |
mouse.KeyDown:connect(function(key) print(key) end)
Make sure you define mouse and all. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 22 Dec 2012 10:44 AM |
to swing an arm shoulder.DesiredAngle = math.pi
|
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|