Animation Id Trouble

I am trying to make an NPC continuously wave, but the output keeps saying that it failed to load the animation.

Here is the exact thing the output says:

18:40:15.279 - Animation “http://www.roblox.com/asset/?id=&serverplaceid=0” failed to load in “Animation.AnimationId”: Animation failed to load

18:40:15.318 - Animation “http://www.roblox.com/asset/?id=&serverplaceid=0” failed to load in “Animation.AnimationId”: Animation failed to load

Here Is My Script
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player,animationID)
while true do
local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/Asset?ID=%22"..animationID
local loadedAnimation = script.Parent.Humanoid:LoadAnimation(animation)
loadedAnimation:Play()
wait(10)
end
end)

and yes I do have a script to fire it, any help with this would be great, thanks!:grin:

1 Like

Your issue is the %22, try changing

to

 "rbxassetid://"

Also just a note, you can run animations from the client and it will still replicate.

1 Like

ok, thanks for that it is working now, also thanks for the client note I thought it was necessary to use the server, but I guess not.

1 Like

No problemo, happy I could help.