Is it impossible to save "StringValue" through DataStore?
Asked by
6 years ago Edited 6 years ago
I won't my datastore to save "StringValue" is it unsupported or it is a script error
it just changes it to a number?
Server Script:
02 | local DataStore = game:GetService( "DataStoreService" ) |
03 | local DataStore_oofs = DataStore:GetDataStore( "SaveSystem_oofs" ) |
04 | local DataStore_rank = DataStore:GetDataStore( "SaveSystem_rank" ) |
07 | game.Players.PlayerAdded:Connect( function (player) |
09 | local LeaderBoard = Instance.new( "Folder" ,player) |
10 | LeaderBoard.Name = "leaderstats" |
12 | local Oofs = Instance.new( "NumberValue" ,LeaderBoard) |
15 | local Rank = Instance.new( "StringValue" ,LeaderBoard) |
17 | Rank.Value = "New Oofer" |
20 | Oofs.Value = DataStore_oofs:GetAsync(player.UserId, Oofs.Value) |
21 | Rank.Value = DataStore_rank:GetAsync(player.UserId, Rank.Value) |
25 | game.Players.PlayerRemoving:Connect( function (player) |
27 | local Oofs = player.leaderstats.Oofs |
28 | local Rank = player.leaderstats.Rank |
30 | DataStore_oofs:SetAsync(player.UserId, Oofs.Value) |
31 | DataStore_rank:SetAsync(player.UserId, Rank.Value) |
If there is a way to save string values, please explain?