Hello! I have been trying to make a tool with animations like walking animations and idles and stuff like that. I made a script but it didn’t work. friends helped out but no success.
Here’s the script;
local character = Player.Character or Player.CharacterAdded:Wait(); -- character needs time to load so you have to wait for it
local animate = character:WaitForChild('Animate') -- WaitForChild waits FindFirstChild doesn't wait
script.Parent.Equipped:Connect(function()
character.animate.walk.WalkAnim.AnimationId = "rbxassetid://5351059805"
character.animate.idle.Animation1.AnimationId = "rbxassetid://5351027528"
character.animate.idle.Animation2.AnimationId = "rbxassetid://5351027528"
end)
Yeah I know that. But I made it a variable. The actual item present in the character is called “Animate” and if you look at the variables in the script, it is clearly stated.
You assigned character:WaitforChild(“Animate”) to the variable animate, but then you tried to reference it by using Character.animate, which looks inside the character model for “animate” which doesn’t exist.
You can fix it by changing Character.animate.walk… to Character.Animate.walk… and similarly changing the rest or by changing character.animate to animate.walk, animate.idle etc, etc…