local DataStoreService = game:GetService("DataStoreService") local MainDataStore = DataStoreService:GetDataStore("MainDataStore") local InfectedLeaderboard = MainDataStore["TotalInfected"] local InfectedLeaderBoard = DataStoreService:GetOrderedDataStore(InfectedLeaderboard)
I'm trying to create a global leaderboard and I save everyone's progress in a table. I have tried multiple ways but it keeps giving me this error
TotalInfected is not a valid member of GlobalDataStore
Any ideas?
Try :
local InfectedLeaderboard = MainDataStore:WaitForChild("TotalInfected")