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

My animation script doesn't work. sdmmmmmmmmmmmmmsddsdssddsda?

Asked by 6 years ago

local animation = script:WaitForChild("Animation") local humanoid = script.Parent:WaitForChild("Humanoid")

local AnimPlay = humanoid:LoadAnimation(animation)

AnimPlay:Play()

I tried different animations, so i think the problem lays in the script.

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago
local Animation = Instance.new('Animation')
local AnimTrack = nil 

function LOAD_ANIM(id)
    Animation.AnimationId = id

    AnimTrack = script.Parent.Humanoid:LoadAnimation(Animation)

    AnimTrack:Play()
end
0
The animation HAS TO BE created by you or it won't work. awesomeipod 607 — 6y
0
Oh thanks kattenverzorger 23 — 6y
0
To add to what awesomeipod said, the animation has to be created by you OR if it is a group game, you have to add the animation to the group's animations. Hope this helps! Lama_llama 8 — 6y
Ad

Answer this question