Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What is Invalid animation id '<error: unknown AssetId protocol>?

Asked by 5 years ago

I was writing a running script and when I tried to add animations to it I get this error

Invalid animation id '<error: unknown AssetId protocol>':

I don't know what I did wrong but here is the script

01local players = game.Players.LocalPlayer
02local character = players.Character
03local UIS = game:GetService("UserInputService")
04local speed = 27
05 
06UIS.InputBegan:Connect(function(key)
07    if key.KeyCode == Enum.KeyCode.LeftShift then
08    character.Humanoid.WalkSpeed = speed
09    local Anim = Instance.new("Animation")
10    Anim.AnimationId = 'rbxassitid://2217747028'
11    local PlayRunAnim = character.Humanoid:LoadAnimation(Anim)
12    PlayRunAnim:Play()
13    end
14end)
15 
16UIS.InputEnded:Connect(function(key)
17    if key.KeyCode == Enum.KeyCode.LeftShift then
18        character.Humanoid.WalkSpeed = 16
19    end
20end)
0
Change 'rbxassitid://2217747028' to 'rbxassetid://2217747028' G2001H 75 — 5y
0
THankyou! I was using rbxasset.id this whole time.. OneNine9 0 — 3y

2 answers

Log in to vote
0
Answered by
G2001H 75
5 years ago
Edited 5 years ago

'rbxassitid://2217747028' this is wrong, not assitid, its assetid

Use this:

01local players = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
02local character = players.Character or players.CharacterAdded:Wait()
03local UIS = game:GetService("UserInputService")
04local speed = 27
05 
06UIS.InputBegan:Connect(function(key)
07    if key.KeyCode == Enum.KeyCode.LeftShift then
08    character.Humanoid.WalkSpeed = speed
09    local Anim = Instance.new("Animation")
10    Anim.AnimationId = 'rbxassetid://2217747028'
11    local PlayRunAnim = character.Humanoid:LoadAnimation(Anim)
12    PlayRunAnim:Play()
13    end
14end)
15 
16UIS.InputEnded:Connect(function(key)
17    if key.KeyCode == Enum.KeyCode.LeftShift then
18        character.Humanoid.WalkSpeed = 16
19    end
20end)
Ad
Log in to vote
0
Answered by
seikkatsu 110
5 years ago

ok so i think you have a problem with your animations priority. i struggled with this quite a lot in the past and recently found out how to fix it all you have to do is go to your animaion plugin and then import the animation you want in the editor from there you open the edit tab and look for the "priprity" setting. you will have to set it to "action"

if this helped you please accept my answer. have a nkce day

0
priority* seikkatsu 110 — 5y

Answer this question