It matters in which situation, if you are afraid that the folder is not loaded before script runs and it contains stuff that does not needed to be seen in studio (ex. Modules) then you can put the folder into ReplicatedStorage as everything in there loads before any script runs.
Else for your plots whatever those are, there is not an API to do like Instance:WaitForPath but you can create 'similar' function which can only be used in case when you know that there will be 25 plots, basically it will wait for folder until it contains given amount of children inside of it.\n
Here is example of how i would implement that:
local function WaitUntilInstanceContainsGivenAmountOfChildren(Instance, Amount)
if (#Instance:GetChildren() => Amount) then
return
end
local Signal = Instance.new('BindableEvent')
local Connection
Connection = Instance.ChildAdded:Connect(function()
if (#Instance:GetChildren() => Amount) then
Connection:Disconnect()
Signal:Fire()
Signal:Destroy()
end
end)
Signal.Event:Wait()
end
WaitUntilInstanceContainsGivenAmountOfChildren(script, 1e999)
This is site-written so i have no idea whether this works but you get the idea, if this is not what you were looking for then :)
Sources
BindableEvents
Event Disconnecting
ChildAdded
4 comments
Is there any way to get the amount of parts loaded in? I've seen games pull this off like Pool Tycoon 4 where it says "Loading 0/100 Zone 1/2"
Also the plot is being loaded in based off a datastore (table) so its all being newly instanced.
wait so if it's loaded from data store, you are looping through parts to create them right? Why don't you just add +1 to counter every loop index to increase amount of loaded parts and the total would be like #table
And for waiting to ploat to load you can just use events to fire that the loop has ended after the loop and you don't need no waiting for the path