#Problem concerning running multiple animations at one.

1 messages · Page 1 of 1 (latest)

tribal snow
#

So i want to make a rig that when attached to a player follows him and do certain animations when idling. But there is a problem when i try running mutiple animations together is that they dont coincide well together. Take a look

tribal snow
#

Okay

#

Wait a lil

#

This is the entire code for the pet

#

This is the part for animations. Simple

#

I have a folder of animations inside the pets that all executes when the script is ran

pliant gull
#

sorry

#

that line

#

means you're playing all the animations in "Animations" group

#

thats why it plays multiple animations.

#

what is it supposed to do?

#

@tribal snow

tribal snow
#

yes, but the thing is look

#

i got one animations for the flapping of the fly's wings

#

and an other one for the fly's entire body to move perdiodicly vertically

#

but if you look at the start of my video

#

the fly's wings during the run time doesnt match move vertically proportionnaly to the body

#

im gonna make an other video to illustrate my point

edgy junco
#

hello

#

Is it sorted?

#

the issue?

#

@OP?

tribal snow
#

no

#

wait

#

im doing something

edgy junco
#

Doing what

#

fixing it?

#

Ohh you wanna play the flapping animation and flying animation simultaneously?

tribal snow
#

those are the 2 animations

#

as you can see everything is right when i launch them separatly

tribal snow
vivid bronzeBOT
#

studio** You are now Level 3! **studio

edgy junco
#

pardon me, ill brb

#

ill help u fix it dw

tribal snow
#

thx ❤️

vivid summit
edgy junco
#

igh im here

#

@tribal snow I needa ask few questions

edgy junco
#

Did you make the animations?

tribal snow
vivid summit
vivid summit
edgy junco
#

You only moved the flaps in the flapping animation? cuz If you did add keyframes for the torso and other body parts, playing animations that move the torso as well would cause unexpected overlapping

vivid summit
#

it probably loaded too fast and misplaced the wings

edgy junco
#

So I'm just asking if you moved only the related Motor6d joints in the animations

#

and not added unnecessary keyframes

edgy junco
vivid summit
tribal snow
edgy junco
#

Hmm. What animation priority you gave to both of em

#

or u didn't set that?

vivid summit
tribal snow
vivid summit
#

the default one?

tribal snow
#

default

edgy junco
#

Hm. In your scripts, try specifying the animation priority of the flapping one to idle, and flying one to action

tribal snow
#

is the one you're using better ?

vivid summit
edgy junco
#

try running both at once

#

something like this

local flapTrack = animator:LoadAnimation(flapAnim)
flapTrack.Priority = Enum.AnimationPriority.Idle
flapTrack:Play()

local swayTrack = animator:LoadAnimation(swayAnim)
swayTrack.Priority = Enum.AnimationPriority.Action
swayTrack:Play()```
#

just try running the animation for now

tribal snow
#

okay im gonna try this out ill be right back

edgy junco
#

Only tell me if both animations work together as supposed or not

vivid bronzeBOT
#

studio** You are now Level 9! **studio

edgy junco
#

For two animations to work together, you gotta avoid adding keyframes for the same joints in both animations.

tribal snow
#

its worse now...

edgy junco
#

i see

#

can u explain whats wrong visually

tribal snow
#

now the wings just rotate they dont move

edgy junco
#

like is it the flapping not working properly

tribal snow
#

its the swaying that doesnt work properly

#

when the sway happens every part of the rig should follow vertically

edgy junco
#

follow vertically?

#

oh i get it

tribal snow
edgy junco
#

I think there is modification of common joints in both animations

#

What you should try is tweak the AnimationWeights

#

But before that

#

Try changing the animationPriorityi

#

once again

#

Increase priority of the animation you want to have more influence

tribal snow
#

thats what im doing and it doesnt seem to get any better

#

i truly think its because of a detail i forgot to mention

#

between the time ive made the 2 animations

#

with the rig editor plugin

#

i had to tweak the joints of the rig

#

so this i could move the body upwards

edgy junco
#

So you made one animation, and re-rigged then made the other?

tribal snow
#

yup

edgy junco
#

hmm. If you think that might be the culprit

#

y not remake the animation

#

you made the sway one later?

tribal snow
#

yes the sway one later

edgy junco
#

But both work alright individually right

#

It shouldn't be the issue then

#

uhm mb ill brb

ripe pendant
tribal snow
#

soo ive redid them and the problem remains...

tribal snow
edgy junco
#

ill explain it.

#

So basically the animation weight is like the influence scale

#

if one got weight of .5 and other got weight of 1, the first one has 33% influence and other one has 66% influence on how the joints will move

#

It sort of blends to animation

#
flapTrack:AdjustWeight(1) -- Full control
swayTrack:AdjustWeight(0.5) -- Half influence (blends with flap)```
tribal snow
#

im gonna try this one out

edgy junco
#

hey wait

#

If it doesn't work the way you want, just tweak the weight

#

increase for more influence and vice versa

#

i mean the other way around

tribal snow
#

well i know already how i can "fix" it but its sad that the studio coudlnt help me and i have to resort to that method

edgy junco
#

what method

tribal snow
#

just gonna have to make it so that the flapping animations also move the wings with the same length as the other animation and every milliseconds reorienrate the wings so that they still flap

edgy junco
#

just hang on, ill find a fix for u

#

Hey OP

#

@tribal snow

#

I recreated the kind of setup you have in your game. It works just fine for me. Perhaps the problem's got to do with the animation you made.

#
local a = script.Parent.Humanoid.Animator
local f:AnimationTrack = a:LoadAnimation(a.Fly)
local i:AnimationTrack = a:LoadAnimation(a.Idle)


f.Priority = Enum.AnimationPriority.Action
i.Priority = Enum.AnimationPriority.Idle

f:Play()
i:Play()```
#

This is the script i used

tribal snow
#

Im gonna try this one out

vivid bronzeBOT
#

studio** You are now Level 4! **studio

tribal snow
#

Im currently eating right now tho

edgy junco
#

o

#

what you eatin?

#

im hungry too..

#

nvm

#

let's talk later when you're back

ripe pendant
#

Yk if you dont want the animation to play at the same time you can also just do: for i, tracks in tracktable do

#

Repeat wait() until track.isplaying == false

#

End

tribal snow
#

alright im back im gonna try your script

#

i think because the fly is always moving around its never truly idle so the flapping doesnt work

#

its a hell of a thing i think yeah like you said its my animations its truly just a small this itself im just gonna focus on bigger things for now thank you for all the help @edgy junco if i could rank you id rank you 5 stars

edgy junco
#

uhm

#

I guess it's okay but. I'll just show you the animations I made for the purpose of helping u understand better

tribal snow
#

mhm you made me thought of something

edgy junco
#

what?

tribal snow
#

nope doesnt work