Kasumo
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 2467 |
|
|
| 02 Aug 2013 03:39 PM |
--This script makes the arms come out to there sides, how would I make the arms SLIDE out instead of just coming out. [If you understand what I mean]
print("Anim Loaded")
plyr = game.Players.LocalPlayer mouse = plyr:GetMouse() function onKeyDown(key) Key = key:lower() if key == "z" then RightShoulder = plyr.Character.Torso["Right Shoulder"] LeftShoulder = plyr.Character.Torso["Left Shoulder"] RightHip = plyr.Character.Torso["Right Hip"] LeftHip = plyr.Character.Torso["Left Hip"] RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(-1, 0, 0) --Too choppy LeftShoulder.C0 = LeftShoulder.C0 * CFrame.Angles(-1, 0, 0) --Too choppy end end mouse.KeyDown:connect(onKeyDown) |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
Kasumo
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 2467 |
|
|
| 02 Aug 2013 03:40 PM |
| How do I use either one of those? |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2013 03:46 PM |
| What do you mean slide out instead of coming out? |
|
|
| Report Abuse |
|
|
Kasumo
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 2467 |
|
|
| 02 Aug 2013 03:49 PM |
Hmm, how can I explain this. I mean when 'z' is pressed, I want the arms to slide out to the position (-1, 0, 0), Instead of just getting there. Would I need to do:
(0, 0, 0) wait() (-0.1, 0, 0) wait() (-0.2, 0, 0) wait()
and so on until (-1, 0, 0) is reached
|
|
|
| Report Abuse |
|
|
|
| 02 Aug 2013 03:51 PM |
| Are you trying to interpolate it basically? |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2013 03:52 PM |
Yes Kas. You should use a for loop to make it easier though.
|
|
|
| Report Abuse |
|
|
Kasumo
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 2467 |
|
|
| 02 Aug 2013 03:53 PM |
| @Clone trooper, I think so? |
|
|
| Report Abuse |
|
|
Kasumo
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 2467 |
|
| |
|
|
| 02 Aug 2013 04:08 PM |
U have me interested. That looks like a nifty way to do some cheap animations
Try
RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(-.5, 0, 0) --Too choppy
and report back.... |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2013 04:10 PM |
Okay, try this.
print("Anim Loaded")
plyr = game.Players.LocalPlayer mouse = plyr:GetMouse() function onKeyDown(key) key = key:lower() if key == "z" then RightShoulder = plyr.Character.Torso:WaitForChild("Right Shoulder") LeftShoulder = plyr.Character.Torso:WaitForChild("Left Shoulder") local oldRight = RightShoulder.C0 local oldLeft = LeftShoulder.C0 for i = 1,10 do RightShoulder.C0 = oldRight * CFrame.Angles(-i*0.1, 0, 0) LeftShoulder.C0 = oldLeft * CFrame.Angles(-i*0.1, 0, 0) wait(0.03) end end end
mouse.KeyDown:connect(onKeyDown) |
|
|
| Report Abuse |
|
|
Kasumo
|
  |
| Joined: 22 Mar 2013 |
| Total Posts: 2467 |
|
|
| 02 Aug 2013 04:17 PM |
@BJC That decreased how far the arms spread out, and I always go the cheap way. c: @Clone, thank you, that's what I was looking for. |
|
|
| Report Abuse |
|
|