Attempt to index nil with 'FindFirstChild'

Hello!
My script makes an error when I run it, can you help me please?
Here is the script:

local BuildData = game:GetService("DataStoreService"):GetDataStore("PlayerPositionData")
function decode_cframe(cf)
	local yes = string.split(cf, " ")
	print(yes)
	return CFrame.new(Vector3.new(yes[1], yes[2], yes[3]), Vector3.new(yes[4], yes[5], yes[6]))
end
function loaddata(table)
	local info
	pcall(function()
		info = BuildData:GetAsync("server")
	end)
	print(info)
	if info then
		for i =1 , #info do
			local str = info[i]
			local split = str:split(':')
			local pos = split[1] 
			local name = split[2]
			print(name)
			local folder = game.ReplicatedStorage:FindFirstChild(name)
			local posc = decode_cframe(pos)
			local place = folder:FindFirstChild(name)
			local clone = place:Clone()
			clone.Parent = game.Workspace
			clone:SetPrimaryPartCFrame(posc)
			print(clone.PrimaryPart.CFrame)
			print(posc)
		end
	else

	end
end
wait(5)
loaddata()
game:BindToClose(function()
	print("closing")
	local builds = {}
	for i,v in pairs(game.Workspace.Objects:GetChildren()) do
		local name = v.Name
		local pos = v.PrimaryPart.CFrame
		local posc = string.format(string.rep("%f ",12), pos:components())
		local save = posc .. ":" .. name
		table.insert(builds, save)
	end
	print(builds)
	BuildData:SetAsync("server", builds)
end)

Here is the error:

i think that means that the folder variable is nil. replace the FindFirstChild with a WaitForChild

It’s working, but now, I have a new error :

replace local place = folder:FindFirstChild(name) with local place = folder:WaitForChild(name)

you putted name without quotes, you needed to put it with quotes to work and if that is not wrong try this

game:GetService("ReplicatedStorage"):FindFirstChild(name)