to get info on a player while the are offline you need datastores. period. Essentially, you need to use a few stores with the key unique per player (player.userId, NOT their name).
ds = game:GetService("DataStoreService")
rank = ds:GetDataStore("Rank")
GroupID = 1337
game.Players.PlayerAdded:connect(function(player)
rank:UpdateAsync(player.userId,function(old) return old or 1 end)
local int = Instance.new("IntValue",player)
int.Name = "Rank"
if player:IsInGroup(GroupID) then
local real = player:GetRankInGroup(GroupID)
int.Value = real
else
int.Value = 1
end
end)
also, make sure that it saves their stats when they leave
game.Players.PlayerRemoving:connect(function(player)
rank:SetAsync(player.userId,player:WaitForChild("Rank").Value)
end)
Its been a while since I've done group stuff, so the GetRankInGroup and IsInGroup are probably wrong, but that is a quick switchout with whatever is on the object browser and/or wiki. The logic still stands, however, and you can add more info like account age and other misc. stuff.
1 comment
I don't really know how to do this, but in the group RAT, they have an info center which stores your information AFTER you play it for the first time. Try doing that! (Sorry I really can't help on this.)