Here's my animation loader for it
local racketdmgpart = racket.DamagePart local wack = script.RacketWack -- animation local mouse = game.Players.LocalPlayer:GetMouse() local wackloader = player.Humanoid:LoadAnimation(wack) mouse.Button1Down:Connect(function() wackloader:Play() end)
Wanna make it so that racketdmgpart part will take health away from them like a kill brick Would love any help, tell me if you need anymore information
Use the Touched event in the damage part.
local racketdmgpart = racket.DamagePart local wack = script.RacketWack -- animation local mouse = game.Players.LocalPlayer:GetMouse() local wackloader = player.Humanoid:WaitForChild("Animator"):LoadAnimation(wack) local IsTakingDamage = false mouse.Button1Down:Connect(function() if IsTakingDamage == false then repeat task.wait() until wackloader.Length > 0 wackloader:Play() IsTakingDamage = true task.wait(wackloader.Length) wackloader:Stop() IsTakingDamage = false end end) racketdmgpart.Touched:Connect(function(otherPart) local otherCharacter = otherPart.Parent local otherPlayer = game.Players:GetPlayerFromCharacter(otherCharacter) if otherPart and otherCharacter and otherPlayer then local otherHumanoid = otherCharacter:FindFirstChildOfClass("Humanoid") if otherHumanoid then if IsTakingDamage == true then otherHumanoid:TakeDamage(otherHumanoid.MaxHealth) end end end end)