Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why is this animation for my viewmodel not working?

So I have this script that is supposed to work... I made it off of roblox's animation editor, and yes, i did export it to roblox

anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://1147622378"
-----------------------
Mouse.Button1Down:Connect(function()
local s = plyr.Character.Humanoid:LoadAnimation(anim)
s:Play()
print("played")
end) 

no errors are displayed, but "Played" is displayed. Im making an animation for a viewmodel...

3 comments

0

I double checked, and yes this is the right id from the roblox page

0

was Mouse or plyr defined?

0

yes, like i said no errors were displayed so you could of obiously assume that i did define them

2 answers

I have 2 guesses, 1st guess; if you created THAT animation and exported it with THAT Animation ID, it should work but if it is made by someone else, it will not work. 2nd guess; To make sure it plays that animation, you must set the Priority to Action in the Animator Plugin in Studios.

If it still does not work, then I have no other clue. Those guesses were from my experiences, hope this helped! It would be better if you could show the whole script, but eh.

put the local script in starter character scripts that should work.

1 comment

0

also you should do the load animation in the beginning of the scripts so it's already loaded and ready to be pressed

This discussion is preserved as it was. New answers, comments, and votes are closed.