Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Animations do not work inside of tools at all?

Asked by 3 years ago

I have watched multiple videos and read multiple articles on how to put animations into tools, but nothing I ever use works, can anyone help me please? Here is a local script I have inside a tool:

script.Parent.Activated:Connect(function()
    local player = game.Players.LocalPlayer
    local animation = script.Parent.Animation --assuming the animation is inside the tool
    local animationid = ("rbxassetid://"..5266726740)
    animation.AnimationId = animationid
    local Track = player.Character:FindFirstChild("Humanoid"):LoadAnimation(animation)
    Track:Play()
end)

0
Why don't you make a variable for your humanoid? JeffTheEpicRobloxian 258 — 3y
0
Maybe you have to replace FindFirstChild With WaitForChild, that's what I always do when referencing a Humanoid, I don't know if that'll help though JeffTheEpicRobloxian 258 — 3y
0
I put WaitForChild, but still does nothing GooseStranger 27 — 3y
0
What are you using? Like what is your tool? JeffTheEpicRobloxian 258 — 3y

2 answers

Log in to vote
0
Answered by
Padugz 40
3 years ago

Are there any errors on the Output when you run your script? If yes, maybe you didn't set your animation priority to action?

0
There are no errors, it just doesn't play the animation GooseStranger 27 — 3y
0
Then maybe you didn't set your animation priority to action or movement? Padugz 40 — 3y
0
Yes that is probably the problem with it. Phyrixia 51 — 3y
Ad
Log in to vote
0
Answered by
Revgery 15
3 years ago

Hello, I'm not sure, but I think your mistake isn't script, I think it's animations.

When you done ur animation you need to set animation priority

When I do tools, I always set Action, but sometimes movement helps also

Hope I helped

Answer this question