#Tool Animation Error

19 messages · Page 1 of 1 (latest)

thin hill
#

Tool Animation Error

#

Provided the code and the destination below:

#
local tool = script.Parent
local anim = tool:WaitForChild("Animation")
local player = game:GetService("Players").LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local humanoid = char:WaitForChild("Humanoid")
local loadanim = humanoid:LoadAnimation(anim)

tool.Activated:Connect(function()
    loadanim.Play()
end)
scarlet pollen
# thin hill

Activated won’t fire if requireshandle property is true

thin hill
#

it's false

scarlet pollen
#

any errors

thin hill
#

sadly not

scarlet pollen
#

do loadanim:Play() instead

thin hill
#

alright

scarlet pollen
#

Animation is part of the localscript not the tool-

thin hill
#

yeah the localscript is inside of the tool

#

the animation is in the script

thin hill
scarlet pollen
#

do local animation = script:WaitForChild(“Animation”) instead then

#

On the 2nd line

thin hill
#

damn it worked

#

thank you