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 » Scripters
Home Search
 

Re: How do you make a idle animation with cframe lerp?

Previous Thread :: Next Thread 
Supr14 is not online. Supr14
Joined: 08 Nov 2015
Total Posts: 1817
10 Jul 2017 04:57 PM
I'm trying to create a idle animation with cframe lerp, it works for one half, but when i do attacks, it glitches, the idle animation isn't finished when i do a attack and so screws up my attack animation

Any solution to this problem, like breaking the idle animation when you walk/do other animations?
Report Abuse
Odawg566 is online. Odawg566
Joined: 28 Jun 2015
Total Posts: 362
10 Jul 2017 05:01 PM
why are you using cframe? Just make and idle animation with animation editor export it, and then put the id in the roblox animation script.
Report Abuse
Supr14 is not online. Supr14
Joined: 08 Nov 2015
Total Posts: 1817
10 Jul 2017 05:02 PM
No, that's not how i want to do it, i want to do it with cframe.lerp

I've seen plenty idle animations with cframe.lerp and they all went smooth
Report Abuse
Odawg566 is online. Odawg566
Joined: 28 Jun 2015
Total Posts: 362
10 Jul 2017 05:08 PM
mmm ok
Report Abuse
Supr14 is not online. Supr14
Joined: 08 Nov 2015
Total Posts: 1817
10 Jul 2017 05:23 PM
Bump i really need help

People in sb won't help me because they're too full of themselves
Report Abuse
VaktovianRed is not online. VaktovianRed
Joined: 20 Aug 2015
Total Posts: 154
10 Jul 2017 05:25 PM
Actually, I want to learn this as well, considering the animation editor's limitations.

Report Abuse
VaktovianRed is not online. VaktovianRed
Joined: 20 Aug 2015
Total Posts: 154
10 Jul 2017 05:29 PM
After doing a little search, I found a decent tutorial that explains CFrame animations, doesn't use lerp, but I imagine that you'd be able to implement it.

https://www.youtube.com/watch?v=uQv5quHgdXQ&t=380s
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
10 Jul 2017 05:30 PM
local isAttacking = false

if attacking then:

isAttacking=true

inside idle animation loop:

if isAttacking then break end
Report Abuse
Supr14 is not online. Supr14
Joined: 08 Nov 2015
Total Posts: 1817
11 Jul 2017 10:42 AM
@Aggressive

It works but, i want it also to break when i walk, so i made the same thing with walking, whenever i walk, walk goes true, i've tried this the same way but it doesn't work? Is it different or something?
Report Abuse
bittercode is not online. bittercode
Joined: 19 Nov 2011
Total Posts: 1051
11 Jul 2017 10:44 AM
TweenService smoothly tweens between CFrames. I recommending taking advantage of that if you're looking to make animations in CFrames.


Report Abuse
Supr14 is not online. Supr14
Joined: 08 Nov 2015
Total Posts: 1817
11 Jul 2017 10:45 AM
Yeahhh no imma just stick with cframe.lerp
Report Abuse
SquidyBroh is not online. SquidyBroh
Joined: 08 Jul 2015
Total Posts: 221
11 Jul 2017 11:07 AM
function Attack()
Attacking = true
--Blah blah
Attacking = false
end


while true do
wait()
if State == "Idle" and not Attacking then
--Idle
end
end
Report Abuse
Alimegacorn is online. Alimegacorn
Joined: 24 May 2013
Total Posts: 899
11 Jul 2017 11:51 AM
you want to use a loop if you're looking to lerp
for i = 1,10 do
wait(0.1)
startingcframe:Lerp(targetcframe, i/10)
end
if you want to create animations like that, i recommend you use welds
if you try to cframe the joints, the default walking animation will mess it up, unless you remove animator
Report Abuse
tentergram is not online. tentergram
Joined: 13 Apr 2013
Total Posts: 2446
11 Jul 2017 11:54 AM
Joint.C0 = Joint.C0:lerp(CFrame.new(x, y, z) * CFrame.Angles(math.rad(r * math.sin(tick()*spd), math.rad(r * math.sin(tick()*spd), math.rad(r * math.sin(tick()*spd)), s)

you can use math.cos too

also if you want sort of a circular movement then use both math.cos and math.sin on different axises
Report Abuse
SquidyBroh is not online. SquidyBroh
Joined: 08 Jul 2015
Total Posts: 221
11 Jul 2017 11:54 AM
omg tent u skid
Report Abuse
tentergram is not online. tentergram
Joined: 13 Apr 2013
Total Posts: 2446
11 Jul 2017 11:55 AM
^die
Report Abuse
SquidyBroh is not online. SquidyBroh
Joined: 08 Jul 2015
Total Posts: 221
11 Jul 2017 12:00 PM
learn to script
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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