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

7 comments

0

You can write "Animation1" and "Animation2" it will not work beacause you are using numbers with strings, write idle["Animation1"].AnimationId

0

thats probarly because the character isnt a thing yet, it didnt load yet

0

make it into a :WaitForChild()

0

the first if statment

0

oh or you probarly already did it, nvm

0

Where is character being defined?

0

Character is above it, I forgot to include it, the code is local character = game.Workspace:WaitForChild(player, 10)