so I'm making a minigame place, for a effect of the minigame loading, I want a barrier to come down infront of the window. For this I have created a table to put the names of the window models in and then loop through the lobby and the table, check if the childs name is the same as the value in the table, and then move each of their primaryparts down to the window.
I have tried this, but it seems to ignore the loop completely (no pause, but Correct! is printed)
Can I have some help please?
for _, win in pairs(windows) do
for _, win2 in pairs(workspace.Lobby:GetChildren()) do
if win2.Name == win then
print("Correct!")
for it = win2:GetPrimaryPartCFrame().Y, 47.923, -.05 do
win2:SetPrimaryPartCFrame(win2:GetPrimaryPartCFrame() * CFrame.new(0,it,0))
wait(0.05)
end
end
end
end