Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Running Animation Script Won't Work. Solution?

Asked by 8 years ago

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?

0
Sorry, my code didn't come out the way I had hoped to, but it's still readable, I guess. dontcometomypage 10 — 8y
0
Try editing the question to where the first set of ~~~~ are on a new line. M39a9am3R 3210 — 8y
0
Thanks. dontcometomypage 10 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

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

Ad

Answer this question