The script you’re showing us now… is it your LocalScript?
If so, try
local tool = script.Parent
local player = game.Players.LocalPlayer
local character = player.CharacterAdded:wait()
local humanoid = character:WaitForChild("Humanoid")
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://8058798658"
local track
tool.Activated:Connect(function()
track = humanoid:LoadAnimation(animation)
track.Priority = Enum.AnimationPriority.Action
track.Looped = false
track:Play()
end)
tool.Unequipped:Connect(function()
if track then
track:Stop()
end
end)
If the code you sent us is NOT the LocalScript, please send us the code for the LocalScript.
Hilariously enough, this is a very difficult task to accomplish. Roblox tools are supposed to be held in the right hand by default. In order for you to switch the hands, you would have to take advantage of some CFrame mechanics and physics constraints, which is very complex.