I'm trying to get a script that will get the children of a folder, then get the children of what's in that folder and set the Amount.Value = 999999999 in those folders, here's what I have so far.
while true do for i,v in pairs(game.Workspace.Tycoon3.Storage:GetChildren()) do v:GetChildren()do v.Amount.Value = 999999999 wait(1) end end end
Find and check if the child exists, if so, set the value.
while true do for _, v in pairs(game.Workspace.Tycoon3.Storage:GetChildren()) do if v:FindFirstChild("Amount") v.Amount.Value = 999999999 wait(1) end end end
Also, with this while true do loop, you're doing the same thing over and over. If that's not what you're looking for, consider changing it. Hope this helped.