I want to play an animation from a gun tool onto a character.
It keeps throwing the error Invalid animation id ‘<error: unknown AssetId protocol>’: at line 41, where it has just
tool.Equipped:Connect(function()
idleAnim:Play()
equipped = true
end) -- This is line 41
I tried to copy and paste a basic animationId template and replace it with my digits, but it isn’t working. Here is my code:
local idleAnim = Instance.new("Animation", script.Parent)
idleAnim.AnimationId = "rbxassetid://131653501889264"
local idleAnimLoad = animator:LoadAnimation(idleAnim)
tool.Equipped:Connect(function()
idleAnim:Play()
equipped = true
end) -- This is line 41
tool.Unequipped:Connect(function()
idleAnim:Stop()
equipped = false
end)
Any help would be appreciated!