Script cant load folder children

So basically my load script works pretty well but its not load last folder child.

local function waitForTrigs()
repeat wait() until workspace:FindFirstChild("DialogueTrigs"):GetChildren()
	if workspace.DialogueTrigs:GetChildren() then
		for i,part in pairs(workspace.DialogueTrigs:GetChildren()) do
			print(part)
		end
	else
		return waitForTrigs()
	end
end
waitForTrigs()

To begin the script below is a cleaned up version as you have a lot of lines that aren’t neccesary

local function waitForTrigs()
    repeat task.wait() until workspace:FindFirstChild("DialogueTrigs")
	for i,part in workspace.DialogueTrigs:GetChildren() do
		print(part)
	end
end

waitForTrigs()

This might fix your issue aswell, if not please explain more detailed

The code @AexesDev provided should be good for what you want but just make sure that you create the DialogueTrigs folder, create all the children you want in there and parent them to that folder. Once they are all parented, then parent the DialogueTrigs folder to the workspace. This is assuming you are probably creating the folder and parenting it to workspace and then creating the children which could cause some timing issues.