for _, child in pairs(workspace.Ruins.RedCastleRuin:GetChildren()) do
if child:IsA("Part") then
for i = BricksToWin, 1, 1000 do
child.Changed:Connect(function()
print("Destroyed")
end)
end
end
end
I want the inner for loop to only count whenever the child.Changed event runs

2 comments
I would say to change the for loop to a while loop, that way you can choose when you want to increment the value instead of incrementing every single time
ok thx