This script was originally written by 'Alvin' the YouTuber and I edited it to try to save a string value, why isn't it loading the String Value? Can you not save String Values?
local DSService = game:GetService('DataStoreService'):GetDataStore('ProjectFalcon_B') game.Players.PlayerAdded:connect(function(plr) -- Define variables local uniquekey = 'id-'..plr.userId local Player_Config = Instance.new('IntValue', plr) local Skin_Tone = Instance.new('StringValue') Player_Config.Name = 'Player_Config' Skin_Tone.Parent = Player_Config Skin_Tone.Name = 'Skin_Tone' -- GetAsync local GetSaved = DSService:GetAsync(uniquekey) if GetSaved then Skin_Tone.Value = GetSaved[1] else local NumbersForSaving = {Skin_Tone.Value} DSService:SetAsync(uniquekey, NumbersForSaving) end end) game.Players.PlayerRemoving:connect(function(plr) local uniquekey = 'id-'..plr.userId local Savetable = {plr.Player_Config.Skin_Tone.Value} DSService:SetAsync(uniquekey, Savetable) end)
Try this
local DSService = game:GetService('DataStoreService'):GetDataStore('ProjectFalcon_B') game.Players.PlayerAdded:connect(function(plr) -- Define variables local uniquekey = 'id-'..plr.userId local Player_Config = Instance.new('IntValue', plr) local Skin_Tone = Instance.new('StringValue') Player_Config.Name = 'Player_Config' Skin_Tone.Parent = Player_Config Skin_Tone.Name = 'Skin_Tone' -- GetAsync local GetSaved = DSService:GetAsync(uniquekey) if GetSaved then Skin_Tone.Value = GetSaved[1] else local NumbersForSaving = {plr.Player_Config.Skin_Tone.Value} DSService:SetAsync(uniquekey, NumbersForSaving) end end) game.Players.PlayerRemoving:connect(function(plr) local uniquekey = 'id-'..plr.userId local Savetable = {plr.Player_Config.Skin_Tone.Value} DSService:SetAsync(uniquekey, Savetable) end)