try this but donât forget to put the animation path in the animation local animation =
Local Script:
local tool = script.Parent
local animation = -- Animation path
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
tool.Activated:Connect(function()
local humanoid = character:FindFirstChildWhichIsA("Humanoid")
local animator = humanoid:WaitForChild("Animator")
if humanoid and animation then
local animationTrack = animator:LoadAnimation(animation)
animationTrack:Play()
end
end)
you need to create a animation inside your tool then change the AnimationId property to your animation id and then just change local animation =
to tool:WaitForChild(âAnimationNameâ)