Storing the items inside the Client:
local replicatedStorage = game:GetService('ReplicatedStorage')
local remotes = replicatedStorage:WaitForChild('Remotes')
local functions = remotes:WaitForChild('Functions')
local checkClass = functions:WaitForChild('CheckClass')
local storedItems = checkClass:InvokeServer()
return storedItems
Server script which gets the data and returns it
function checkClass.OnServerInvoke(player)
repeat wait() until dataReady
local user = playersData[player.UserId]
if not user then return end
return user.Classes
end
Now this works fine, when the player joins. However, if this data gets updated, then the client will still have the old data to view. I’ve tried multiple things to update the data in the client, doing this in a separate module, but this does nothing anyway
storedItems = checkClass:InvokeServer()