Hi, um I don’t know why but my Animation script (local script) isnt working
then the output said this:
I think this will work
local anims = {script.Parent:WaitForChild("Hold"), script.Parent:WaitForChild("Click")}
Still won’t work :(. I tried making a new script, but no
Can you show the script? i’ll try to make it work
local plr = game:GetService("Players").LocalPlayer
local anims = {script.Parent:WaitForChild("Hold"), script.Parent:WaitForChild("Click")}
local loadedAnims = {}
local tool = script.Parent
local animator
tool.Equipped:Connect(function(mouse)
animator = plr.Character:WaitForChild("Humanoid"):WaitForChild("Animator")
if not loadedAnims[1] then
loadedAnims[1] = animator:LoadAnimation(anims[1])
end
loadedAnims[1]:Play()
end)
tool.Unequipped:Connect(function()
loadedAnims[1]:Stop()
end)
I will try it. Thanks for the help!
It still won’t work…Sorry for keeping your time…
Does the script have any errors? since it worked for me
Have you tried WaitForChild(“Hold”)?
Yes. That’s what @Botix_s suggested
Do getchildren() on hammer and print it, just to see what children exist just before script runs that line
The script cannot find the object named “Click” or maybe you haven’t added one. Try this
local anims = {script.Parent:WaitForChild("Hold")}
IT ACTUALLY WORKED!! Thanks so much!!!
Thanks to you aswell! Have a good day/night
No problem, have a good day 