Here is my code
local model = workspace.Plots["1"].Building
model.ChildAdded:Connect(function()
for name, child in pairs(model:GetChildren()) do
child:FindFirstChild("Hitbox").Touched:Connect(function(hit)
if hit.Parent ~= child then
child:Destroy()
end
end)
end
end)
The child is a model and it has a part under it called Hitbox but in the console it is saying attempt to index nil with Touched

3 comments
typo(?) you said it has hitbox but in script there is a capitol "H"
typo(?) you said it has hitbox but in script there is a capitol "H"
yeah its actually called Hitbox lemme change that