SimpleAnimate | An easy-to-use & flexible module replacement for the default Animate script

When I asked to add animation pausing, I sorta meant as a replacement for changing the animation speed to 0, where you could resume it with play.

Yes, I know xd charlimit

2 Likes

Can we have the ability to pause individual action animations and check if they are paused? Itā€™ll replace having to get the animation then check the speed of it.

1 Like

Hello,

it works thanks!!

but now when i play the animation i get this ReplicatedStorage.Scripts.AnimationController.Utility.RandomWeighted:6: attempt to get length of a nil value

thanks

Can you show your code? :GetRandomActionAnim() works fine for me

animator.Action:Create("outFloor", outfloorAnimInfo, true, Enum.AnimationPriority.Action4)
local anim = animator.Action:GetRandomActionAnim("outFloor")
anim:Play(1,1,5)

maybe itā€™s because the animation start below the ground ?

Can you show outfloorAnimInfo?

local outfloorAnimInfo = {
	outFloor = {
		id="136608518018924"
	}
}

It happend after the animation is played

1 Like

Oh no it is supposed to be an array like this

local outfloorAnimInfo = {
    {id = "136608518018924", weight = 10}
}

The name is passed as a seperate argument (1st one) to Action:Create()

I tried that but it didnā€™t work because it gives something like this

outfloor = {
   [1} = {
       id = "id"
   }
}

the animation work now but when it finishes it looks like it tries to play animated cores in a loop as long as I donā€™t stop the animation myself

I donā€™t quite understand, do you mean the core animations (such as running, walking, idle, etc) donā€™t stop when the action finishes?

Yes,

When the outFloor animation finishes, it makes a big jump and tries to play both the idle and walking positions at the same time. However, this might be an issue with my animation, as it goes out of the ground

If you wish to stop all core animations, heres how to do it with the PoseController:

local PoseController = animator.Core.PoseController

PoseController:SetCoreActive(false)
PoseController:StopCore()

And then to restart it:

PoseController:SetCoreActive(true)
PoseController:PlayAnimation("Idle") -- or whatever pose you wanna restart at
1 Like

okay thanks!

and is there any way to detect when the animation end ? i tried anim.ended:connect but it doesnt work

1 Like

If the animation is looped u can do AnimationTrack.DidLoop:Connect(function()

my bad i forgot to disable looped sorry x)

1 Like

okay thank you i fixed the anim !!! awesome script!!

1 Like

Package Version 60:

  • Fixed the Action:SetEmoteBindable() hook erroring because it was using a removed function to get a random animation (it now uses the new randomWeighted function like the rest of the module)

  • Added docstrings for (I think) every single public method

  • Added a type for the last argument of SimpleAnimate.new(), stateMachine. Very useful if you arenā€™t using humanoids but still want animations

  • Added Action:BulkCreate() which accepts an AnimationsList similar to how SimpleAnimate.new() accepts an AnimationsList for the coreAnimations parameter.

  • Added string literal types for SimpleAnimate.getCopyOfAnimsList() so it is easier to know what lists you can copy

WIP:

  • Support for root movement

  • Support for user-owned animation packs

The new update is available on the latest package version and the marketplace

what happened to the animation pack support, is it impossible?

1 Like

Oh right iā€™m working on that too xd