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

[UNANSWERED]Adding Animation to a Custom Character isnt working?

I've tried everything i swear, but everytime i do so, it loads the character, and not the Animation, anyone know how? Here is what happens: https://gyazo.com/6cb3955ee0fc6674fdeaa404b400380f

I also cant jump? Here is the script i use to add the animation:

game.Players.PlayerAdded:connect(function(player)
		player.CharacterAdded:connect(function(character)
player.Character.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=282403667" -- Insert the ID here--
player.Character.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=265353604" -- Insert the ID here--
player.Character.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=228806506" -- Insert the ID here--
end)
end)


4 comments

0

I'm having this same exact problem. Been at this for almost a week. My animation plays. Sort of. It doesn't play the animation correctly though.

0

This is the animation I made and uploaded: https://gyazo.com/93fab8bb23050295dba3e86935655107, This should be the same animation loaded into my humanoid: https://gyazo.com/ea4cef60c8321de6050ffda435d7bdb5

0

Watch your Character closely. See if it has any unrelated movements to your animation. We may be having similar problems.

0

hmm? what u mean?

2 answers

Well im not an expert but ill try to help.

So you have the animation,but you didn't load it in the character Heres an example.

local Anim = Instance.new("Animation")
Anim.Id = "http://www.roblox.com/asset/?id=228806506"

local animTrack = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(Anim)
animTrack:play()

Thats an example on how to play animations via script. I hope this can help you.

2 comments

0

Nope, not at all, thats basically the same EXACT thing up there dude.

0

Did you load the animation in the humanoid?

#My guess I think it's because on line 3 the Walk Animation's name is actually, "RunAnim" it will error and prevent the rest of the script from erroring.


#Final Product

game.Players.PlayerAdded:connect(function(player)
        player.CharacterAdded:connect(function(character)
		player.Character.Animate.walk.Run.AnimationId = "http://www.roblox.com/asset/?id=282403667" -- Insert the ID here--
		player.Character.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=265353604" -- Insert the ID here--
		player.Character.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=228806506" -- Insert the ID here--
	end)
end)


Hope it helps!

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