in fact I was trying to animate the character along with a tool, it’s just that the tool animations are not replicated correctly and the scripts are inside the tool.
One sec. Something has changed. Earlier I saw reference to a second Humanoid, but that is not there anymore. I may have accidentally switched threads mid post. Going back over this code.
in fact, I made it myself in blender and it’s in StarterPack
OK, I found what I was looking for:
It wasn’t in the code, it was in the error message.
Humanoid is in Character, but your error message is looking for it in Backpack! Your character definition is incorrect.
Change this:
local Character = Tool.Parent
to
local Character = Player.Character
see if that helps with the error. I had mistaken this for a second Humanoid the first time through.
You typed Players with an S. It should be singular. (Line 3)
In fact I wrote players because the variable is at the top obtaining the service of players.
Let me know if there are any more errors to hammer out, then we can go back to checking the replication part.
So far the FindFirstChild error is the only one that jumps in the OutPut.
Which line? Did you fix the Character definition? Players refers to the service. Player refers to the player.
You have to eliminate all errors for the script to run.
the error line is the Character variable
Oh, I see. I must be going cross-eyed today. Player is broken too! I recommend this solution here:
This will also give you the backpack, so you need one more Parent in there. Maybe it’s better at this point to eliminate Player from your script completely and fix your Character line with the extra Parent.
local Character = tool.Parent.Parent
I tried and I no longer get the FindFirstChild error but now I get another error telling me that it cannot load the animation and it refers to the AnimationTrack variable:
OK, AnimClipProvider is a service I never use. By the look of it, you never use it either. I only see one thing wrong with that line: “AnimationTrack” is a specific object, and is a reserved name(?) Try calling it “AnimTrack”?
Emm no, whenever I am going to play an animation I call it AnimationTrack and then AnimationTrack: Play (). I honestly don’t know what happens there but how can I solve that error?
This is the entirety of commands of the AnimationClipProvider service. You did not use any of these. I do know it is recommended you never make a variable with the same name and capitalization of an existing API object. I do not know what happens when you do.
If the duplicate name is not causing the error, I have no idea how to fix this. Maybe someone else can see something I’m missing!
Actually I don’t have 2 variables with the same name and I don’t use those functions, I don’t know what’s happening
That’s what I’m trying to explain. Roblox already uses “AnimationTrack”
But if that is not the problem, how can we solve it?
I have been able to solve the problem, and it is that you have to set both animations in action but from the animation editor, otherwise they would not work correctly.