I am trying to make a script that will turn a player into a zombie, but the animation changes don't take effect at at all. What am I doing wrong here? The code is below:
if character then
local animate = character:WaitForChild("Animate")
character.Humanoid:RemoveAccessories();
if animate then
print("Animate script exists")
for _, playingTracks in pairs(character.Humanoid:GetPlayingAnimationTracks()) do
playingTracks:Stop(0)
end
animate.Disabled = true
animate.idle.Animation1.AnimationId = "rbxassetid://1113752682"
animate.idle.Animation2.AnimationId = animate.idle.Animation1.AnimationId
animate.walk.WalkAnim.AnimationId = "rbxassetid://1113750642"
animate.run.RunAnim.AnimationId = animate.walk.WalkAnim.AnimationId
animate.climb.ClimbAnim.AnimationId = "rbxassetid://1113754738"
animate.fall.FallAnim.AnimationId = "rbxassetid://1113751889"
animate.Disabled = false
end
COMMUNITY QUESTION
Trying to change animation of a player when they become a zombie, why isn't it updating?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

7 comments
You can write "Animation1" and "Animation2" it will not work beacause you are using numbers with strings, write idle["Animation1"].AnimationId
thats probarly because the character isnt a thing yet, it didnt load yet
make it into a :WaitForChild()
the first if statment
oh or you probarly already did it, nvm
Where is character being defined?
Character is above it, I forgot to include it, the code is local character = game.Workspace:WaitForChild(player, 10)