Humanoid Animation problem

Hello guys!

I want to add an animation to my Noob Model that haves Humanoid.The location of this model is game.Workspace and i have an script inside this model that should run an animation but it’s not

There’s the script:

local loc = script.Parent

local animation = Instance.new("Animation",loc)
animation.AnimationId = "rbxassetid://658830056"

local animationTrack = loc.Humanoid:LoadAnimation(animation)
animationTrack:Play()

Why it’s not working? I’ve been trying to change the AnimationID to “http://www.roblox.com/Asset?ID=(...)” but it didn’t work. That’s a Script, not LocalScript. I don’t know what i’m doing wrong. Please help me the beautiful Roblox Community!

~Sorry for my bad english

1 Like

Does it return an error, or does it not work?

@iGottic it’s not returning an error but it’s not working also

I think you can only play animations on the client, and it will replicate it to the server.

So I should use RemoteEvent (or without RemoteEvent) and play it on the server?

You can’t play it on the server. Play it on the client instead.

1 Like

Yeah if you’re trying to play an animation on a player’s character it needs to be on the client. It talks about it on the animation page.

It’s a “Noob” model with an Humanoid, the script is located inside of this model. If i’m missing something please tell me what i’m doing wrong 'cause i’m just dumb.

You want it to walk with that animation is that correct?

Incorrect. Check API and Tutuorials for information on that.

This happens to me sometimes. Is it an animation from another group you have, or another account?
Sometimes, I will have an animation from my profile that I put in a group game. It may playback for me, but not for other people. The simple solution is to upload it to the right place :wink: .

2 Likes

I was asking you to check API. I don’t want this guy to have wrong info.
I’m not mad you or anything tho, I just want people to have good info, y’know?
I’m open to be corrected tho, so please lemme know :slight_smile:

Also, the solution I had:

1 Like

Again, You want it to walk with that animation is that correct?

@iGottic
it’s the animation from roblox: Ninja Walk - Roblox
this game have the “team create” option enabled but i’m alone in this group

@phSalami
Yes

Should I just create another test-place ?

Use that animated NPC https://www.roblox.com/library/609768681/Animated-NPC-R15

and edit its animation ids and it will be good.

2 Likes

Hmmm.
I’m not sure if you can use Roblox Animations if you don’t own it. It hasn’t worked for me in that situation.
Try using the idea @phSalami had too!

1 Like

Ok, I’ll try it tomorrow 'cause i don’t have time now. I think that will be the solution

Thanks @phSalami and @iGottic for your help. I really appreciate it! <3

I’ll post the solution tomorrow

2 Likes

When you do try it, see if one of your animations work. If it does, then my theory is correct.
If it doesn’t, try the other NPC animation code.
If THAT doesn’t work, it may be internet or studio problems?

1 Like

You can’t load roblox animations I tried it my self.Use the animated NPC

2 Likes

Also, make sure to mark the problem as solved.

Okay! thank you. I’ll post the solution tomorrow 'cause i’m not in 100% sure that your idea is correct :slight_smile:

1 Like