Whenever I change the currently playing animation on a model, there is a split-second where the model returns to its default pose (in my case a t-pose).
This ruins animations and I am unable to find a way to fix this issue. I have noticed that after a while this issue stops, but in practice within my game “waiting it out” is not really a solution.
That being said, I thought the fact that it fixes itself over time was an indicator that the animation was just not loaded in, so I used ContentProvider service to pre-load all of my animations before hand. This changed nothing.
I also tried changing the animation priority and this seemed to make the issue worse.
It’s very possible this is just an issue with how I am handling the animations, but in my defense there is not a whole lot of documentation on how to properly handle animations, so if someone could just help me out. ![]()
![]()
Code:
local CONTENT = game:GetService("ContentProvider")
local poseAnims = { -- My Animations
92180798556668,
15407448069,
15869696445,
}
-- Pre-load animations
local preLoadedAnims = {}
for i, anim in poseAnims do
local poseAnim = Instance.new("Animation")
poseAnim.AnimationId = "rbxassetid://"..anim
table.insert(preLoadedAnims, poseAnim)
end
CONTENT:PreloadAsync(preLoadedAnims)
while task.wait() do
for i, anim in preLoadedAnims do
local person = workspace:WaitForChild("People"):WaitForChild("Kimi")
local controller = person:WaitForChild("AnimationController").Animator
-- Stop all anims first
for i, playAnim in controller:GetPlayingAnimationTracks() do
playAnim.Priority = Enum.AnimationPriority.Core
playAnim:Stop()
end
-- Play pre loaded animation
local standingTrack = controller:LoadAnimation(anim)
standingTrack.Priority = Enum.AnimationPriority.Action
standingTrack.Looped = true
standingTrack:Play()
task.wait(2)
end
end