|
| 29 Oct 2011 07:43 PM |
Hey guys, I have a question. What's a good method for animating the character to do something(ie: Reloading a gun, kicking, etc.)
I know that all the joints have a motor, but I think they just rotate one way, and I want it to rotate X,Y, and Z. |
|
|
| Report Abuse |
|
|
| |
|
|
| 29 Oct 2011 09:00 PM |
| CoRoutines bro. For Loops. Motors. CFraming. Etc... |
|
|
| Report Abuse |
|
|
|
| 29 Oct 2011 09:25 PM |
| Could you give me an example? I've tried removing the animation script and CFraming, but it doesn't rotate... |
|
|
| Report Abuse |
|
|
|
| 29 Oct 2011 09:44 PM |
Hmmm...
local Joint1; local Joint2;
function wapow(Rarm, Larm, times)
Joint1 = Instance.new("Motor", Larm); Joint2 = Instance.new("Motor", Rarm);
Joint1.C0 = CFrame.new(-1.5, 0, 0); Joint2.C0 = CFrame.new(1.5, 0, 0);
for i = 1, times do
Joint1.C0 = Joint1.C0 + Vector3.new(0, 0, 0); Joint1.C0 = Joint1.C0 * CFrame.new((math.pi/2)/times, 0, (math.pi/2)/times);
Joint2.C0 = Joint2.C0 + Vector3.new(0, 0, 0); Joint2.C0 = Joint2.C0 * CFrame.new((math.pi/2)/times, 0, (math.pi/2)/times);
end
end
function Equip()
local RightArm = game.Players.LocalPlayer.Character["Right Arm"]; local LeftArm = game.Players.LocalPlayer.Character["Left Arm"]; increment = 10
coroutine.resume(coroutine.create(wapow), RightArm, LeftArm, increment)
end |
|
|
| Report Abuse |
|
|
|
| 29 Oct 2011 09:58 PM |
Oops
local Joint1; local Joint2;
function wapow(Rarm, Larm, times)
Joint1 = Instance.new("Motor", Larm); Joint2 = Instance.new("Motor", Rarm);
Joint1.C0 = CFrame.new(-1.5, 0, 0); Joint2.C0 = CFrame.new(1.5, 0, 0);
for i = 1, times do
Joint1.C0 = Joint1.C0 + Vector3.new(0, 0, 0); Joint1.C0 = Joint1.C0 * CFrame.new((math.pi/2)/times, 0, (math.pi/2)/times);
Joint2.C0 = Joint2.C0 + Vector3.new(0, 0, 0); Joint2.C0 = Joint2.C0 * CFrame.new((math.pi/2)/times, 0, (math.pi/2)/times);
wait()
end
end
function Equip()
local RightArm = game.Players.LocalPlayer.Character["Right Arm"]; local LeftArm = game.Players.LocalPlayer.Character["Left Arm"]; increment = 10;
coroutine.resume(coroutine.create(wapow), RightArm, LeftArm, increment);
end |
|
|
| Report Abuse |
|
|
|
| 31 Oct 2011 07:32 PM |
Sorry for the late reply(Out of town), but it didn't work. (Yes, I put it in a local script).
It just doesn't run. Please help!
P.S. Happy Halloween! |
|
|
| Report Abuse |
|
|
| |
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 01 Nov 2011 09:15 PM |
| In fact, I'm really close to finishing an easy-to-use animator tool that would be perfect for you ;) |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2011 09:16 PM |
Sweet, I'll look forward to that! I wish you could still use the old 'animation' object, but Roblox just had to screw up that good idea...
I BLAME JOHN! |
|
|
| Report Abuse |
|
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 01 Nov 2011 09:17 PM |
| Yeah, I saw an inappropriate animation once, and I believe that's the reason they took them down. Have you ever used xLEGOx's animator tool? |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2011 09:19 PM |
| Yeah, his tool is what I used to use. I'm pretty sure it broke, though. Did he fix it? |
|
|
| Report Abuse |
|
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 01 Nov 2011 09:20 PM |
| No, and I don't believe he can. His tool uploaded the animations to a 3rd party server and used hashed ID's, but ROBLOX set up the content filter to block those hashed IDs. Anyway, mine will work exactly like his. |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2011 09:29 PM |
Sounds cool. If you release it, PM me _if_ you can(I'll be checking models, too).
Back on-topic: How do you get somebody's arm to just rotate sideways or something? I've tried a lot of ways, yet none of them seem to work... |
|
|
| Report Abuse |
|
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 01 Nov 2011 09:38 PM |
Use a weld and rotate its C0
Weld.C0 = Weld.C0 * CFrame.Angles(#, #, #) |
|
|
| Report Abuse |
|
|
shrimpoop
|
  |
| Joined: 28 Sep 2008 |
| Total Posts: 1307 |
|
|
| 01 Nov 2011 10:21 PM |
| KingMod, could you give me lessons on coroutines? You seem to know alot lol. |
|
|
| Report Abuse |
|
|