Animation won't play

Can you mark the line in your code with a note or something? It’ll just be a little more helpful.

1 Like
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage.Remotes:WaitForChild("Basic")

remoteEvent.OnServerEvent:Connect(function(player)
	print(player.Character.Name)
	local character = player.Character
	local humanoid = character:FindFirstChild("Humanoid")
	local animation = replicatedStorage.Animations.Animation
	
	local animationTrack = humanoid.Animator:LoadAnimation()  //this line
	animationTrack:Play()
end)
1 Like

Oh, you didn’t put an animation in the LoadAnimation() brackets. That’s why you got that error. Use LoadAnimation(animation) and tell me if it works or not.

1 Like

Ah good call. Now I get no errors but the animation does not play.

1 Like

When you print player.Character.Name, does it successfully print the character’s name or does it print something else?

1 Like

It prints correctly. Also not sure if it’s important but it is a custom animation.

1 Like

Just tried a roblox made animation and it still does not play.

1 Like

Can you send us a screen shot of where everything is? Like the animation, server/local script, as that stuff that might help.

1 Like

image

1 Like

Is this game under your name or under a group?

1 Like

It is under my group. The animation is also published under my group.

1 Like

YOu need to make sure the animation can be played, as it may not play if the animation owner is not you.

1 Like

That’s why your animation isn’t playing. You don’t have access to it.

1 Like

No, it should still work. I publish animations under my group all the time and they work perfectly.

1 Like

Sometimes my animation don’t play because it is owned by a group

1 Like

Even roblox made animations do not work.

1 Like

I’ve had the same issue with my game, everything worked perfect, no errors, nothing but my animation just wouldn’t play, I searched for hours and found nothing, I think it had to do something with roblox studio, cause I put the exact same animation in my other game and the same script and it worked, but there might be another solution, have you checked if the animation is r6 or r15? in that case you might need to change that

2 Likes

How do I check which one it is?

1 Like

You can’t really check that, but what you can do however is change your game to r6 and after r15 in the settings menu in roblox studio

1 Like

I made the animation on an r15 rig.

1 Like