im getting the error ( Invalid animation id '<error: null id>': - Servidor - Combat_Handler:19)
the code:
local Animations = script.Animations
local KeyProvider = game:GetService("KeyframeSequenceProvider")
local Combat_Handler ={ MeleeAnims = { ["L"] = Animations.Melee1, ["LL"] = Animations.Melee2, ["LLL"] = Animations.Melee3, ["LLLL"] = Animations.Melee4, },
}
function Combat_Handler.getAnimation(Humanoid,sequence) local length = 0
local Keysequence = KeyProvider:GetKeyframeSequenceAsync(Combat_Handler.MeleeAnims[sequence].AnimationId) local Keyframes = Keysequence:GetKeyFrames() for i=1,#Keyframes do local time = Keyframes[i].time if time > length then length = time end
end
return Humanoid.Animator:LoadAnimation(Combat_Handler.MeleeAnims[sequence]), length
end
return Combat_Handler
the video that i copied the script : https://www.youtube.com/watch?v=UVT-eFsSxGQ