so this was supose to be a script wher if the parent totches a part named "somthing" but it dosnt work. :(
local parentPart = script.Parent
local damageAmount = 25
local targetPartName = "somthing"
parentPart.Touched:Connect(function(hit)
if hit.Name == targetPartName then
local current = hit
while current.Parent do
local config = current:FindFirstChild("Config")
if config and config:FindFirstChild("Health") then
local health = config:FindFirstChild("Health")
if health:IsA("NumberValue") then
health.Value -= damageAmount
print("Damaged:", health:GetFullName(), "→", health.Value)
break
end
end
current = current.Parent
end
end
end)
** You are now Level 1! **