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.
https://scriptinghelpers.org/questions/33259/is-there-any-way-to-save-values-to-a-player-and-load-it-when-they-return#36073
I did my best to explain DataStores to their most basic usage! :) Please do check it out if you'd like to learn.