For i,v loop not firing properly

hi there! so I’m working on a somewhat of a chunkloader for water, but the line where it is going trough every chunk “part”,

for _,chunk in pairs(game:GetService("Workspace").Server.Chunks.WaterChunks:GetChildren()) do
^ that line in particular, it is not firing because the print does not fire, did I do any stupid mistake that is clearly obvious here?

function functions:InitializeChunkLoader()
	print("[ChunkLoader]: Initializing Chunkloader...")
	
	local waterRenderingDistance = players.LocalPlayer.PlayerData.Settings.RenderingDistance.WaterRenderingDistance.Value
	local waterStudDistance = (waterRenderingDistance * 32) -- each level of rendering distance is 32 studs, if you have level 1 on rendering distance, it will only render 32 studs.
	local playerPosition = players.LocalPlayer.Character.HumanoidRootPart.Position
	
	-- /*/ Water Chunkloading
	local initializedWaterChunks = {}
	for _,chunk in pairs(game:GetService("Workspace").Server.Chunks.WaterChunks:GetChildren()) do
		print(chunk.Position .. " loaded chunk " .. tostring(initializedWaterChunks[chunk.Position]["chunkRegion"]))
	end
	
	print("[ChunkLoader]: Finished initializing Chunkloader")
end

and the waterchunks folder is just a folder with parts, as the name references.

What are your error messages? (30 characters)

there are no error messages, that’s the reason to that I think I’ve just made some simple mistake and it’s rather obvious.

Is this being ran at startup? If so try to wait for the parts to load.

yup, I forgot to wait for the parts, I just threw in a wait before running the loop, I thought it was a simple mistake and it was a simple mistake.

Please try and avoid using wait() to fix these sorts of issues because it is sort of a band-aid fix. Here is a great tutorial about why you should avoid using wait:

A better alternative to just putting wait before your loop would be to use WaitForChild() because it is a built in way of waiting for objects to load. However from my knowledge in some cases this can be just as bad as using wait. Instead you should be using events whenever you can to avoid using wait() because Roblox has an event for anything you could possibly be waiting for.