Hey so I'm following Roblox's tutorial on data store and I am only going to post here where my problem is inside the my ModuleScript:
local Players = game:GetService("Players")
local DataStoreService = game:GetService("DataStoreService")
local playerData = DataStoreService:GetDataStore("Test1")
local sessionData = {}
--sets up the player when he joins
local function setupPlayerData(player)
local playerUserId = player.UserId.."_Test1"
local success, data pcall(function()
data = playerData:GetAsync(playerUserId)
end)
if success then
if data then
sessionData[playerUserId] = data
else
sessionData[playerUserId] = {
["Coins"] = 0,
["Wins"] = 0
}
end
else
warn("setupPlayerData Error: cannot access data for this player")
end
end
Players.PlayerAdded:Connect(setupPlayerData)
When I test it, It always prints/warns "setupPlayerData Error: cannot access data for this player" which is the error I put just in case the pcall fails, which is what is probably happening right now.
Any help would be greatly appreciated.

1 comment
Still doesnt work hmm..