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

Tool animation not playing when activated. Could anyone help with finding the error?

Asked by 5 years ago

My Animation wont play for reasons I dont know. I have made sure that the animation itself was using the right character style when played. I have no error warning what so ever. I am using a local script in the tool. I have tested it on roblox studio testing and on the actual roblox player.

Tool = script.Parent

local player = game.Players.LocalPlayer

repeat wait() until player.Character ~= nil

local hum = player.Character:WaitForChild("Humanoid")



local animation = Tool.Anim

local AnimTrack = hum:LoadAnimation(animation)



Tool.Activated:Connect(function(mouse)

AnimTrack:Play()

end)



Tool.Unequipped:Connect(function()

AnimTrack:Stop()

end)
0
The code looks ok excluding th repeat loop. I would try and load the animation in Equipped ? User#5423 17 — 5y
0
If there are no errors the code is either working (but not as you intended) or not running. You can print on line 1 to see if it is running. gullet 471 — 5y
0
I tried both. The script is running all the way to the Tool.Activated. I also changed the loadanimation to Tool.Equipped thoughtless_space 95 — 5y
0
perhaps it is a problem with the animation itself? SteamG00B 1633 — 5y
View all comments (3 more)
0
^ I would do a test not using the tool to make 100% the animation works. User#5423 17 — 5y
0
Try just making a simple script that waits maybe 10 seconds and then plays the animation just to see if the animation plays without having to do any of the other stuff inside this script. SteamG00B 1633 — 5y
0
The animation runs good. To see where in the animation its not playing i made multiple limbs move. All move except the limb controlling the tool. Any way past that? thoughtless_space 95 — 5y

Answer this question