GIF: https://gyazo.com/aec7f0f8ec266b213ff10f3dd463dde8
Script:
----- Variables local Player = game.Players.LocalPlayer local Character = Player.Character or Player.CharacterAdded:Wait() local Tool = script.Parent local animation = script:WaitForChild("SwingAnim") local CanSwing = true local Swinging = false local Settings = { SwingTime = 0.5, Damage = 15, } ----- Functions Tool.Activated:Connect(function() if CanSwing then Swinging = true print("Activated") local animtrack = Character:WaitForChild("Humanoid"):LoadAnimation(animation) animtrack:Play() CanSwing = false Tool.Handle.Touched:Connect(function(hit) if game.Players:GetPlayerFromCharacter(hit.Parent) then Tool:WaitForChild("R"):FireServer("Hit",hit.Parent,Settings.Damage) end end) wait(Settings.SwingTime) CanSwing = true Swinging = false end end)
I can't find an error in your script, but someone else may. It seems to me that it may be an issue with your animation. Try and go into editor and make sure everything is correct there?