I have tried making a for loop in my game for that. I'll just include the part of the script with the part.
Can someone tell my why this won't work and how to fix it
InRound.Changed:Connect(function() for _, child in pairs(workspace.Ruins:GetChildren()) do if child:IsA("Part") then for i = BricksToWin, 1000, 1 do if child.Position == Vector3.new(0,-2,0) then print("Destroyed") Score.Value = "A team has:".. i .. "bricks destroyed" end end end end else
Instead of using the if child.Position, use the child.Changed event