Data store not saving

I suggest using Datastore2. It is a lot more secure and a lot easier to save and load data with.

For answering your question, I suggest starting new threads with the coroutine feature.

For example, at the while wait(30) part you can do

coroutine.wrap(function()
	while wait(30) do
		local tosave = {}

		for i,v in pairs(dataholder:GetChildren()) do
			table.insert(tosave, v.Value)
			print(i,v.Name,v.Value)
		end
		dataholder:SetAsync(key,tosave)
	end
end)()
2 Likes