Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can you use bool and string values in datastores?

Asked by 6 years ago

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)
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. User#25115 0 — 6y
0
Lol, no. User#25115 0 — 6y
0
Although, it is convention to use double quotes. User#25115 0 — 6y

Answer this question