When I join the game, the stats are not showing. I got this from a tutorial. It was working earlier but now it's not for some strange reason. Here is is:

Yes I know it's not finished and that it's not in a table...I am working to figure out how I would go about doing that. For now, I just need these to go into the player when joining the game

local DataStore = game:GetService("DataStoreService") local ds1 = DataStore:GetDataStore("ExampleDataStore1") local ds2 = DataStore:GetDataStore("ExampleDataStore2") local ds3 = DataStore:GetDataStore("ExampleDataStore3") local ds4 = DataStore:GetDataStore("ExampleDataStore4") local ds5 = DataStore:GetDataStore("ExampleDataStore5") local ds6 = DataStore:GetDataStore("ExampleDataStore6") local ds7 = DataStore:GetDataStore("ExampleDataStore7") local ds8 = DataStore:GetDataStore("ExampleDataStore8")

game.Players.PlayerAdded:connect(function(player) local PlayerStats = Instance.new("Folder",player) PlayerStats.Name = "PlayerStats" local PlayerWins = Instance.new("IntValue",PlayerStats) PlayerWins.Name = "PlayerWins" local PlayerLosses = Instance.new("IntValue",PlayerStats) PlayerLosses.Name = "PlayerLosses" local Player1v1Wins = Instance.new("IntValue",PlayerStats) Player1v1Wins.Name = "Player1v1Wins" local Player2v2Wins = Instance.new("IntValue",PlayerStats) Player2v2Wins.Name = "Player2v2Wins" local Player3v3Wins = Instance.new("IntValue",PlayerStats) Player3v3Wins.Name = "Player3v3Wins" local PlayerLeadRank = Instance.new("IntValue",PlayerStats) PlayerLeadRank.Name = "PlayerLeadRank" local PlayerModRank = Instance.new("IntValue",PlayerStats) PlayerModRank.Name = "PlayerModRank"

PlayerWins.Value = ds1:SetAsync(player.UserId) or 0 ds1:SetAsync(player.UserId, PlayerWins.Value)

PlayerWins.Changed:connect(function() print("Saving Data") ds1:SetAsync(player.UserId, player.PlayerStats.PlayerWins.Value) print(player.Name.."'s Data of"..PlayerWins.Value.." "..PlayerWins.Name" has been saved!") end)

1 comment

0

Format your code in Lua code block, please.