My animations never, EVER, have worked ONCE

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to play animations, it’s as simple as it gets

  2. What is the issue? Include screenshots / videos if possible!
    In my 4+ years on this platform, not a single time I tried working with animations has ever worked out.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    What you see on the video is actually me using the default script you get on the tutorial page

wait(3)
local Players = game:GetService("Players")

local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()

-- Ensure that the character's humanoid contains an "Animator" object
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")

-- Create a new "Animation" instance and assign an animation asset ID
local kickAnimation = Instance.new("Animation")
kickAnimation.AnimationId = "rbxassetid://18719642772" --this animation ID is a fast test/random animation I made on the spot to try this out
print("playing")
-- Load the animation onto the animator
local kickAnimationTrack = animator:LoadAnimation(kickAnimation)

-- Play the animation track
kickAnimationTrack:Play()

-- If a named event was defined for the animation, connect it to "GetMarkerReachedSignal()"
kickAnimationTrack:GetMarkerReachedSignal("KickEnd"):Connect(function(paramString)
	print(paramString)
end)

The animationID in this case is a random animation I made in 3 seconds.

I actually have a far larger and more complex script, but after 2 days of non stop trying to get the animations to play in my experience, I said to myself "ok, fine, you never had good luck playing animations on studio. If not even the default tutorial animation script works, then everything you do is a waste of energy

Turns out, yeah, even the basic tutorial code won’t work.
The animations I published (and the random one I just tried playing) are published under my name, so at this point I really hope someone can find the issue or else I have to give up on taking jobs that require me to animate something just because of an invisible bug that has been haunting me for half a decade.

I’d appreciate any help and suggestion at all, no matter how “dumb” it may sounds :smile: (often times the solution is so evident it seems dumb once you discover it)

2 Likes

1. Maybe the Kick Animation is instantly playing when the player joins, so maybe add a wait to it, or loop the animation
2. Or maybe you uploaded the animation on your account, but the game is in a group (Or otherwise)

2 Likes
  1. the first line is a wait(3) line, and as seen in the video, after 3 seconds the game is fully loaded and the output prints out “playing”
  2. the animation got uploaded on my account, but the game is also a private game I made on my account (it shows up in “MyPlaces”, not “GroupGames”, so I safely assume it’s a private game)

Got any other ideas maybe?

2 Likes

So I put the Script inside a local script inside StarterPlayerCharacter and it worked perfectly. Maybe you have your Local Script in the workspace, because Local Scripts don’t work there.

2 Likes

it’s the “LocalScript” I am using for this test (it’s a simplified version of my CustomAnimationsHandler)
image

That’s exactly what I meant, it doesn’t matter what I do, the others get it working with the exact, same, script while it won’t work with me.

Did you do something different by any chance?

2 Likes

Yes I put in another Animation ID that I uploaded. Maybe the problem is, that the animation you are using isn’t yours?

2 Likes

No it is mine. I made it on the spot and uploaded it under my name.

I can try with another random animation I’ll make in 3 seconds, but I don’t think it’s going to change anything.

I’ll keep you updated tho

1 Like

Okay that’s very weird because it literaly works for me with the exactly same code. Is it maybe working when you play the game outside Roblox Studio?

1 Like

Good idea, but again it’s not that as well

Here’s a video showcasing how I upload my animations:

Did you tried to parent the instance somewhere?

Did you tried to play the animation with an input/button pressed? (sometimes it not work the first time)

Make sure that the animation type is the same as your character body type (R15 / R6) otherwise it won’t work (i noticed that you’ve made the animation on an R6 character while your own character is a R15).

2 Likes
  • I just tried parenting the instance somewhere and nope, it still didn’t work
  • I tried before to have the animation play with an input button pressed, that didn’t work. Hence I’m trying to have the animation play without any input: if the current animation script refuses to work, it still won’t work if I attach an input requirement. A bit like, if you open the fridge and it’s empty, after you close it and reopen it, it’ll still be empty: it won’t magically fill up with food because you closed it
  • What do you mean by same as my character body type? I’ve attached the youtube video above your message that shows how I uploaded the animation, am I doing it correctly?

Here’s the video once again:

Edit (since I saw your edited your message directly after I posted mine)

I’ll try to put the character rig to R6, that’s a good idea

1 Like

I mean, it is to try playing animation more than once to see if it work after the first call or not, but alright.

You’re mading the animation on an R6 character while your own character is a R15… you can’t mix both, R6 animation work on a R6 Humanoid and R15 animation work on an R15 Humanoid.

2 Likes

My gosh, I can’t believe the issue was because of different bodyparts, I should’ve had the courage to ask this a long time ago, thanks a lot you’re a life saver :smile:

2 Likes

You’re trying to play an R6 animation on an R15 Character. some1 already anywered ye

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.