I've attempted DataStores, and even with ScriptGuider's help, I have no clue. So I've resorted to DataPersistance, but once again, it won't *~%"£$% work.
local group = 1234 --GroupID
game.Players.PlayerAdded:connect(function(player)
if player:WaitForDataReady() then
local leadr = Instance.new("IntValue",player)
leadr.Name = "leaderstats"
local rank = Instance.new("StringValue",leadr)
rank.Name = "Rank"
local department = Instance.new("StringValue",leadr)
department.Name = "Department"
if player:IsInGroup(group) then
rank.Value = player:GetRankInGroup(group)
department.Value = game.Players[player.Name]:LoadString("Department") --Load the Department
while wait(30) do
rank.Value = player:GetRankInGroup(group)
end
else
rank.Value = "Guest"
department.Value = "N/A"
end
player.leaderstats.Department.Changed:connect(function()
game.Players[player.Name]:SaveString("Department", player.leaderstats.Department.Value) --Save the Department
end)
end
end)
There's no error, but the value won't load. Which is pretty annoying as DataStores won't work, nor will this.

1 comment
Data Persistance is deprecated, and not guranteed to work. Use data stores instead. :SetAsync(), :UpdateAsync(), and :GetAsync() are the major functions of data stores. Also know :GetDataStore().