ProfileService global update issue (guild system)

I’m making a guild system using ProfileService.
I’ve followed a tutorial regarding updating globally however that dealt with player data not server data but I used it regardless since I don’t know any other way.

My issue is that whenever I create/delete guilds, the global update part doesn’t work and the other servers don’t update their guild list. Moreover, they don’t even receive the active update (Tested from two accounts; one in a public server, the other in a VIP server)

-- Server script inside ServerScriptService
local ProfileService = require(script.ProfileService)
local RepStorage = game:GetService("ReplicatedStorage")
local GuildService = require(script.GuildService)

local guildRemote = RepStorage.guildRemote

local guildStore = ProfileService.GetProfileStore("testkey15355", {})
local guildList = guildStore:LoadProfileAsync("guilds", "ForceLoad")

local function handleLockedUpdate(globalUpdates, update)
	local id = update[1]
	local data = update[2]
	if data.updateType == "Creation" then
		
		local guildData = data.guildData
		local guildName = guildData[1]
		local guildInfo = guildData[2]
		if not guildList.Data[guildName] then
			guildList.Data[guildName] = guildInfo
		end
	elseif data.updateType == "DeleteAll" then
		guildList.Data = {}
	end
	
	globalUpdates:ClearLockedUpdate(id)
end

local globalUpdates = guildList.GlobalUpdates

for index, update in pairs(globalUpdates:GetActiveUpdates()) do
	globalUpdates:LockActiveUpdate(update[1])
end

for index, update in pairs(globalUpdates:GetLockedUpdates()) do
	handleLockedUpdate(globalUpdates, update)
end

globalUpdates:ListenToNewActiveUpdate(function(id, data)
	globalUpdates:LockActiveUpdate(id)
end)

globalUpdates:ListenToNewLockedUpdate(function(id, data)
	handleLockedUpdate(globalUpdates, {id, data})
end)

guildRemote.OnServerEvent:Connect(function(Player, Action, ...)
	if Action == "Create" then
		GuildService.createGuild(guildStore, guildList, Player, ...)
	elseif Action == "View" then
		GuildService.viewGuilds(guildList)
	elseif Action == "DeleteAll" then
		GuildService.deleteAllGuilds(guildStore, guildList)
	end
end)
-- Module Script inside the server script
local module = {}

function module.createGuild(guildStore, guildList, Player, guildName)
	if guildList.Data[guildName] == nil then
		guildList.Data[guildName] = {
			Owner = Player.userId;
			Members = {};
		}
		
		guildStore:GlobalUpdateProfileAsync(
			"guilds",
			function(globalUpdates)
				print("creating active update...")
				
				globalUpdates:AddActiveUpdate(
					{
						updateType = "Creation";
						guildData = {
							guildName,
							{
								Owner = Player.userId;
								Members = {};
							};
						}
					}
				)
			end
		)
		
		print("Created guild with name: " .. guildName)
	else
		warn("Guild already exists!")
	end
end

function module.viewGuilds(guildList)
	for i, v in pairs(guildList.Data) do
		print(i)
	end
end

function module.deleteAllGuilds(guildStore, guildList)
	guildList.Data = {}
	
	guildStore:GlobalUpdateProfileAsync(
		"guilds",
		function(globalUpdates)
			print("creating active update...")
			globalUpdates:AddActiveUpdate(
				{
					updateType = "DeleteAll";
				}
			)
		end
	)
end

return module

Hey, I’m currently trying to do something very family and am facing the same issue of the active update not going through. Is there any chance you found a solution?

Omg, year old thread. inactive profiles wont recieve updates. Best thing to use messaging service every minute or so to find one server to load the profile of guilds that need to be accessed.

How would I prevent data getting overridden if members of a guild in different servers update the guild in some way? (etc getting a higher bounty)

You can use broadcast out to all servers and wait for a response. If guild isn’t loaded in the server call out to every other server to see if any other server has it loaded. If no response just load it in that server. This will forcefully release that profile on any other server and will cause future servers to broadcast to it. To update the loaded guild just sent information to that server with messaging service. You can identify servers by getting the job id /w game.JobId.

Honestly, it’s a little difficult but better imo than using memorystore. But you can also consider making your own webserver.