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

My animation script doesn't work. sdmmmmmmmmmmmmmsddsdssddsda?

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

local Animation = Instance.new('Animation')
local AnimTrack = nil 

function LOAD_ANIM(id)
	Animation.AnimationId = id
	
	AnimTrack = script.Parent.Humanoid:LoadAnimation(Animation)

	AnimTrack:Play()
end

3 comments

0

The animation HAS TO BE created by you or it won't work.

0

Oh thanks

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!

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