Default animation script doesn't work on custom characters

Hello! For some reason, while still working on my custom characters following up this topic, Roblox default animate script that you find in players’ character does not work at all with custom characters, it just plays no animation while walking, holding tools etc. I searched quite a lot but the best result I got is GnomeCode’s Custom Characters’s animation script, which looks like this:

-- Very basic walking animation script by GnomeCode
local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")

-- Remeber to select the animtion object and set the id to your own!
local walkAnim = script:WaitForChild("Walk")
local walkAnimTrack = humanoid.Animator:LoadAnimation(walkAnim)

local idleAnim = script:WaitForChild("Idle")
local idleAnimTrack = humanoid.Animator:LoadAnimation(idleAnim)

humanoid.Running:Connect(function(speed)
	if speed > 0 then
		if not walkAnimTrack.IsPlaying and idleAnimTrack.IsPlaying then
			idleAnimTrack:Stop()
			walkAnimTrack:Play(0.100000001, 1, 1.2)
		end
	else
		if walkAnimTrack.IsPlaying and not idleAnimTrack.IsPlaying then
			idleAnimTrack:Play()
			walkAnimTrack:Stop()
		end
	end
end)

idleAnimTrack:Play()

but even if it works, it’s just for walking. Also, this is not the main thing: the main thing is that there’s wind outside the running animation’s speed is not being sped up by the WalkSpeed property of the Humanoid, now, you would say that I only have to copy and paste the part where this is set, BUT, it’s literally 60% of the script if not more, I already tried so don’t tell me I’m wrong.

So, to summarize this, I need to find a way to make the running animation’s speed property changes on the Humanoid’s WalkSpeed property, just like it does by default and if possible, make the jumping working (not necessary at all).

Thanks for helping me!

2 Likes

You have to own animations for them to work properly.

Roblox owns the default ones so they only work for Roblox characters.

You can, however, import their animations then re-publish them for your specific R15 character.

I am not sure it will work, but you can try:

  1. Click on Animation Editor
  2. Click on the ...
  3. Click on Import
  4. Select From Roblox

At the bottom of the Asset Configuration window, you will see an input box with the words Animation ID.

  1. In that box, type the Roblox Animation ID you want to import.
    (You can get the numbers from the default Animate script.)
  2. Click Submit.
  3. Re-publish the animation as your own.

You would need to have all the same parts and same rig setup and same names as the default character.

1 Like

I’ll check that out! But I already tried with animations I owned so I don’t know if it would work but it’s worth trying honestly.

Ok, it worked! Thanks, the only time I saw a similar solution, it was not explained how.
(:

Wait, it was too fast. Too good to be true…

The rig is a R15 rig, my character’s rig is R15 also, but the animation is like broken.
The walk one is broken. Is their a way to fix this? I already tried make my own walk animation but there are some issues with it sadly.

1 Like

I just tested the idea.

I replaced the LeftLowerArm with a Cylinder.

I made the cylinder the same size and position of the original mesh.

Then moved:
• LeftElbowRigAttachment
• LeftWristAttachment
• OriginalSize
• LeftElbow
into the cylinder.

Then I updated the attachments to be the cylinder instead of the original mesh.

Then I deleted the original mesh and pressed play in Animator.

It worked great.

Screen Shot 2023-11-16 at 3.44.11 PM

2 Likes

The rig was a bit broken for some reason, I fixed it by generating a new R15 rig using Avatar > Rig builder and select your prefered avatar type.

Also, the R15 rigs comes with the default animation script! There are more settings to tweak than you have on your own characters!

Original message:
Maybe it was the rig, I’ll try use a classic R15 rig and put the clothing and other things.

I’ll tell you if it worked, I was at school so I wasn’t able to test this idea.
I’ll let you know in this message by editing it!

It did work! Also, I do not need to own roblox animations to put them.
Thanks for your help!

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