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

Running Animation Script Won't Work. Solution?

So, I'm working on a game and I'm trying to get down all the animations first. So, I whipped up a running animation in Animation Editor and then made a script to put it in the game, but it won't work. Here is what I made:

game.Players.PlayerAdded:connect(function(player)
	while not player.Character do wait() end
	local character = player.Character
	local animateScript = character.Animate
	animateScript.run.RunAnim.AnimationId = 'http://www.roblox.com/asset/?id=333279377'
end)

I've been tweaking it up and changing what I thought was the source of the problem, but to no avail, It doesn't work.

Anyone know a simple remedy to my problem?

3 comments

0

Sorry, my code didn't come out the way I had hoped to, but it's still readable, I guess.

0

Try editing the question to where the first set of ~~~~ are on a new line.

0

Thanks.

1 answer

I haven't found any real errors within your code, but it may work if I fix it up a bit.

game.Players.PlayerAdded:connect(function(player)
   player.CharacterAdded:connect(function(character)

    animateScript = character.Animate
    animateScript.run.RunAnim.AnimationId = "rbxassetid://333279377"
end)
end)

If it helped, accept!

~Chem

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