I made a simple sword and want to activate an animation from the tool. I can't seem to get it to play and can't figure why any help will be greatly appreciated!
1) All parts are Welded together not anchored, and Collide is turned on only in Handle atm
2) I have animated and published the animation to roblox and attached id to animation named "SwordSlash"
local Tool = script.Parent --Variables local swordAnim --Animations local swordSlash = Tool.Handle.SwordSlash Tool.Activated:Connect(function() local humanoid = Tool.Parent:FindFirstChildWhichIsA("Humanoid") if humanoid then local animator = humanoid:FindFirstChildOfClass("Animator") if animator then swordAnim = animator:LoadAnimation(swordSlash) print("Got Here") swordAnim:Play() wait(1) end end end)
I have tried different varations with Stop() and debounce, but kept simplifying to try to get it working. Lastily I added the animator line since, I read that Humanoid:LoadAnimation was deprecated. I can get the sword out and the print "Got Here" to run ,but animation doesn't play. If anyone has any insight I would love some help on this Thanks! - Froxty
There is "animation" and there is "animator". I think you are using animator instead of animation look at the image link below
https://ibb.co/nRbL0yF