Annoying Animation Bug

  1. What do you want to achieve? Keep it simple and clear!

I’m experiencing an annoying bug while trying to add animations to my rng game.

  1. What is the issue? Include screenshots / videos if possible!
    I’m getting the error: “Failed to load animation with sanitized ID <error: missing assetid>: Animation failed to load, assetId: https://assetdelivery.roblox.com/v1/asset?id&serverplaceid=0

  2. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I have tried editing my script where I get the animations, but nothing I tried has worked.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

Animation Config Module Script

local AnimationsConfig = {
	Common = 119942998779886,
	Uncommon = 119942998779886,
}
return AnimationsConfig

The part that plays the animation (Seperate Module Script)

local function Animation(player, char, aura)
	local result, animationId = hasAnimation(aura.Name)
	if result then
		local humanoid = char:FindFirstChildOfClass("Humanoid")
		if not humanoid then return end
		
		local animator = humanoid:FindFirstChildOfClass("Animator")
		
		if not animator then
			animator = Instance.new("Animator")
			animator.Parent = humanoid
		end
		
		local animation = Instance.new("Animation")
		animation.AnimationId = "rbxassetid://"tostring(animationId)
		local animationTrack = animator:LoadAnimation(animation)
		
		animationTrack:Play()
		
		if not ActiveAnimations[player.UserId] then
			ActiveAnimations[player.UserId] = {}
		end
		
		ActiveAnimations[player.UserId][aura.Name] = animationTrack
	end
end

you are not concatenating the string properly:

animation.AnimationId = "rbxassetid://"..tostring(animationId)

you have to have the .. between it

1 Like

Oh my gosh thank you so much :sob: I know how to connect them, but didn’t notice the mistake. Everything works perfectly now thank you so much!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.