for i, v in pairs(game.Workspace.Obby.Regular.Push:GetChildren()) do
if v.Push then
local part = v
local value = v.Push.Value
spawn(function()
while wait() do
wait(value)
part.Decal.Texture = "rbxassetid://272632642"
for i = 1,(part.Size.z / 0.30) do
part.CFrame = part.CFrame + (part.CFrame.lookVector * -0.30)
wait()
end
wait(value)
part.Decal.Texture = "rbxassetid://334960362"
for i = 1,(part.Size.z / 0.30) do
part.CFrame = part.CFrame + (part.CFrame.lookVector * 0.30)
wait()
end
end
end)
end
end
Making a script that increases the size of all the parts with a "Push" Value inside of them in a folder but only one part is actually increasing in size but the others aren't
How do I fix the problem?

3 comments
Your problem is being cause by the while loop. It was never built on a condition or told to break, therefore it won't. It'll simply just hang, and the for loop cannot iterate to the next part.
You can remove the loop entirely, or wrap it in a spawn function to start multiple threads
i haven't thought of that thanks