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

Changing the walk animation on PlayerAdded?

I have this line of code in a PlayerAdded function and I'm not sure why I am getting an error. Here is the code

player.Character.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/? 
id=252557606"

Now there is nothing wrong with the variable player as i was able to use it in other lines of code in this function. Here is the error message

ServerScriptService.Leaderboard:16: attempt to index field 'Character' (a nil value)

Any help is appreciated :)

2 comments

0

The character might not be loaded in yet or something is wrong with the “player” variable. Try adding a .CharacterAdded event.

0

Yea thats what i noticed right before i read this answer

1 answer

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