Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Saving data with HttpService?

I've never tried HttpService before, but someone suggested that I use it to save table values (Better explained in my previous question). I don't know where to start with saving by using this method, even after looking over the wiki page a couple times. Help?

1 answer

You shouldn't be using HttpService for something like this. Instead, use DataStores. To save a table value with HttpService, simply do something like

datastore:UpdateAsync("Example",function(old) -- make sure it's a table
	if type(old)~="table" then
		return {}
	end
	return old
end)

From then on, you can do:

datastore:UpdateAsync("Example",function(old)
	old[whatever]=whatever2
	return old
end)

Remember to almost never use SetAsync unless the data saved before does not matter.

1 comment

0

Can you explain this in greater detail, please?

This discussion is preserved as it was. New answers, comments, and votes are closed.