Hopefully the title gives decent enough context/insight, but if not, I’ll just build on it. A day ago, I had an issue where my animations wouldn’t load for the character once they died, rendering one of my systems useless. I then began to get assistance and fix one of the other issues that happened at the player’s death.
Now, I tried different methods to fix the animation, but the issue always seemed to be that the module script ran far faster than the time of the character’s loading, so I decided to make Player a variable, and do the CharacterAdded:Wait event. Apparently, the character never loads? The script yields and is just not able to do it’s job. Here’s the script here, but I sincerely don’t know what the issue could be.
function AnimationModule.getSingleAnimation(Player, Humanoid, ChosenAnimation)
print("start relaxin")
Player.CharacterAdded:Wait()
print("we finished waiting")
local Length = 0
local KeySequence = KeyProvider:GetKeyframeSequenceAsync(ChosenAnimation.AnimationId)
--print("Getting the Sequences and loading em")
local KeyFrame = KeySequence:GetKeyframes()
for i=1, #KeyFrame do
local Time = KeyFrame[i].Time
if Time > Length then
Length = Time
end
end
return Humanoid.Animator:LoadAnimation(ChosenAnimation), Length
end
(If you ask why I made a module isn’t the easy way, the answer is because of length being returned.)
If anyone could help me, I would appreciate it so much, thank you for your time.