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

why doesn't my animation load and play?

Asked by 6 years ago
--choppy choppy >:3

local tool = script.Parent
local toolDeb = false

tool.Activated:connect(function(hit)
    if toolDeb == false then
        local chopAnim = Instance.new("Animation", game.Players.LocalPlayer.Character)
        chopAnim.AnimationId = "http://www.roblox.com/Asset?ID=1079330549"
        local chopAnimTrack = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(chopAnim)
        chopAnimTrack:Play()
        wait()
    end
end)

It doesn't play...

0
Do not only post code, or only post an explanation. Both are required to make a good question. hiimgoodpack 2009 — 6y

1 answer

Log in to vote
0
Answered by
oSyM8V3N 429 Moderation Voter
6 years ago

Most people usually do it like this :

local chopanim = Instance.new("Animation")
chopanim.AnimationId = "http://www.roblox.com/Asset?ID=1079330549"

To play :
local animTrack = Humanoid:LoadAnimation(chopanim)
animTrack:Play()
0
If you are not posting an explanation, please use comments instead! hiimgoodpack 2009 — 6y
0
U right, my fault oSyM8V3N 429 — 6y
Ad

Answer this question