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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Choppy Animation.

Previous Thread :: Next Thread 
Kasumo is online. 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 is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
02 Aug 2013 03:40 PM
Use Motors or fake arms
Report Abuse
Kasumo is online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
02 Aug 2013 03:40 PM
How do I use either one of those?
Report Abuse
brandon58590 is not online. brandon58590
Joined: 08 Mar 2008
Total Posts: 996
02 Aug 2013 03:46 PM
What do you mean slide out instead of coming out?
Report Abuse
Kasumo is online. 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
CloneTrooper1019 is not online. CloneTrooper1019
Joined: 19 Jan 2009
Total Posts: 6227
02 Aug 2013 03:51 PM
Are you trying to interpolate it basically?
Report Abuse
brandon58590 is not online. brandon58590
Joined: 08 Mar 2008
Total Posts: 996
02 Aug 2013 03:52 PM
Yes Kas. You should use a for loop to make it easier though.

Report Abuse
Kasumo is online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
02 Aug 2013 03:53 PM
@Clone trooper, I think so?
Report Abuse
Kasumo is online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
02 Aug 2013 04:04 PM
Bump
Report Abuse
BJCarpenter is online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
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
CloneTrooper1019 is not online. CloneTrooper1019
Joined: 19 Jan 2009
Total Posts: 6227
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 is online. 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
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