I am trying to make a simple axe system, but for some reason, It is only detecting Character Parts and Itself
local Tool = script.Parent
Tool.Activated:Connect(function()
local HumanoidRootPart = Tool.Parent:FindFirstChild("HumanoidRootPart")
--Hitbox Spawn
local hitbox = Instance.new("Part")
hitbox.Size = Vector3.new(5, 5, 5)
hitbox.Transparency = .5
hitbox.BrickColor = BrickColor.Red()
local hitboxClone = hitbox:Clone()
hitboxClone.Parent = workspace
hitboxClone.CanCollide = false
hitboxClone.CFrame = HumanoidRootPart.CFrame * CFrame.new(0, 0, -4)
task.spawn(function()
task.wait(1)
if hitboxClone then
hitboxClone:Destroy()
end
end)
--Hitting Tree
hitboxClone.Touched:Connect(function(part)
print(part)
end)
end)
