--Services local Players = game:GetService("Players") --Modules --Constants local Character = script.Parent local Humanoid = Character:FindFirstChildOfClass("Humanoid") local Player = Players:GetPlayerFromCharacter(Character) --Variables local CurrentTool local CurrentFunc --Functions --Main Character.ChildAdded:Connect(function(o) if o:IsA("Tool") then CurrentTool = o if CurrentFunc then CurrentFunc:Disconnect() end local Animations = o:FindFirstChild("Animations") if Animations then local TestAnimation = Animations:FindFirstChild("Main") if not TestAnimation then return end CurrentFunc = o.Activated:Connect(function() local Test = Humanoid:FindFirstChildOfClass("Animator"):LoadAnimation(TestAnimation) Test:Play() end) end end end)
Make sure your "Tool" have a handle
If not then turn "requirehandle" property to false
Also if a script not giving any error, i suggest using the print function to see where the script manage to go through and where it didnt