I've enabled API access to roblox studio btw, I am very confused how this is not working on studio but works on the actual game, might be cause I am changing the values through the explorer and properties tab and not through like some sort of script when I am in studio and when I am in the actual game I pull out the dev console and type command to give myself money that way..
local DS = game:GetService("DataStoreService") local myDS = DS:GetDataStore("FlexingSimulatorDataStor") local startingFlexCoins = 15 game.Players.PlayerAdded:Connect(function(plr) local leader = Instance.new("Folder",plr) leader.Name = "leaderstats" local stats = Instance.new("Configuration",plr) stats.Name = "Stats" local flexCoins = Instance.new("IntValue",leader) flexCoins.Name = "FlexCoins" local ego = Instance.new("IntValue",stats) ego.Name = "Ego" local key = "key - "..plr.UserId local playerData = myDS:GetAsync(key) if playerData then flexCoins.Value = playerData[1] or startingFlexCoins ego.Value = playerData[2] else local valuesToSave = {flexCoins.Value,ego.Value} myDS:SetAsync(key,valuesToSave) end end) game.Players.PlayerRemoving:Connect(function(plr) local key = "key - "..plr.UserId local data = { plr.leaderstats.FlexCoins.Value, plr.Stats.Ego.Value, } myDS:SetAsync(key,data) end)
This is pretty normal, and sometimes it will randomly save (lol), if you need coins for testing then put in a script temporarily that searches for Player1 and give them coins