I have a full-on script inside for a tree chopping system.
> local HitboxModule = require(game.ReplicatedStorage.HitboxModuleMain)
> local Params = OverlapParams.new()
> local Hitbox = HitboxModule:CreateWithPart(script.Parent, Params)
> Hitbox:Start()
> local health = 15
> local bool = true
> local ongoing = true
> local respawn = math.random(15,20)
> Hitbox.Touched:Connect(function(Object)
> if Object.Name == "Handle" and Object.Parent:FindFirstChild("IsAAxe") and Object.Parent:FindFirstChild("Hit Sound") then
> local status = Object.Parent:WaitForChild("Type")
> local HitSound = Object.Parent:WaitForChild("HitSound")
>
> if health > 0 then
> if status.Value == 'Wood' then
> health = health - 1
> HitSound:Play()
> elseif status.Value == 'Stone' then
> health = health - 1.5
> HitSound:Play()
> elseif status.Value == 'Iron' then
> health = health - 3.5
> HitSound:Play()
> elseif status.Value == 'Diamond' then
> health = health - 5
> HitSound:Play()
> end
> elseif health <= 0 and bool == true then
> bool = false
> for i, x in pairs(script.Parent.Parent:GetChildren()) do
> x.Anchored = false
> end
> wait(respawn)
>
> end
> end
> end)