I was wondering if you could use Boolean values and string values in datastores. Like for saving a backpack, etc.

Example:

local ds = game:GetService('DataStoreService'):GetDataStore('Test')
game.Players.PlayerAdded:Connect(function(player)
	local scope = 'userid-' .. player.userId
	ds:SetAsync(scope, true)
	ds:SetAsync(scope, 'test') 
end)

3 comments

0

Uh, yes you can store booleans and strings. Though, not like you are doing. At least, it will likely not work as you expect.

0

Lol, no.

0

Although, it is convention to use double quotes.