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

Animation is loaded but it's not showing/Rendering in game?

Asked by 5 years ago

So i used a free model and broke it down, to see how it worked

local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/Asset?ID=2083636940"
local trackanimation = nil
local playability = true
function playAnimation(AnimationSource)
    if playability == true then
        local plr = game.Players.LocalPlayer
        trackanimation = plr.Character.Humanoid:LoadAnimation(animation)

        trackanimation.KeyframeReached:connect(function()
        print('Ok') 
        end)
        trackanimation:Play()
    end
end
script.Parent.MouseButton1Click:connect(playAnimation)

In the output there are no errors so I am assuming it is loading but it doesn't seem to be rendering.

0
The MouseButton1Click has no parameters, so remove AnimationSource on line 5. Also it's Connect not connect User#19524 175 — 5y

Answer this question