There are many ways you can do this. The least hacky way is this:
for _, Animation in pairs(Humanoid:GetPlayingAnimationTracks()) do
if string.find(string.lower(Animation.Name), string.lower("Tool")) then
Animation:Stop()
end
end
Alternatively you can modify the existing “Animate” script which is automatically parented to every player’s character. To do this you would take a copy of the script and remove the relevant tool animation parts, specifically the following.
Then place this new version of the script in a suitable directory (I’ll use the “ReplicatedStorage” folder for this example). Now all we need is a script which replaces the old script with this newer rendition, that can be achieved relatively easily with the following server script.
local Players = game:GetService("Players")
local Replicated = game:GetService("ReplicatedStorage")
local NewAnimate = Replicated.Animate
Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
local OldAnimate = Character:WaitForChild("Animate")
OldAnimate:Destroy()
NewAnimate:Clone().Parent = Character
end)
end)
Here’s a copy of the model file for reproduction purposes.