local ProfileService = require(script:WaitForChild('ProfileService'))
local DATA_FOLDER = { --ALL OF THE THINGS THAT NEED TO UPDATE LIVE IN GAME.
Catalog = {};
M_Menu_Themes = {};
TimeSync = {};
}
local GameProfileStore = ProfileService.GetProfileStore("Data4", DATA_FOLDER)
local profile = GameProfileStore:LoadProfileAsync(tostring("Test"))
if profile then
profile:Reconcile()
while true do
task.wait(10)
print(profile:IsActive())
end
print(profile)
end
local MessagingService = game:GetService("MessagingService")
local Topic = "Example"
local DATA_FOLDER = { --ALL OF THE THINGS THAT NEED TO UPDATE LIVE IN GAME.
Catalog = {};
M_Menu_Themes = {};
TimeSync = {};
}
-- start listening to the topic
MessagingService:SubscribeAsync(Topic, function(Data, Sent)
print(Data)
end)
-- send a message to all subscribers of the topic
MessagingService:PublishAsync(Topic, DATA_FOLDER)
local ProfileService = require(script:WaitForChild('ProfileService'))
local MessagingService = game:GetService("MessagingService")
local DATA_FOLDER = { --ALL OF THE THINGS THAT NEED TO UPDATE LIVE IN GAME.
Catalog = {};
M_Menu_Themes = {};
TimeSync = {};
}
MessagingService:SubscribeAsync("Example", function(Data, Sent)
print(Data)
end)
local GameProfileStore = ProfileService.GetProfileStore("Data4", DATA_FOLDER)
local profile = GameProfileStore:LoadProfileAsync(tostring("Test"))
if profile then
profile:Reconcile()
profile:ListenToRelease(function()
MessagingService:PublishAsync("Example", DATA_FOLDER)
--???????
--HOW TO PICK UP PROFILE AGAIN IN ANOTHER SERVERE AFTERE THIS SSERVER DROPS THIS PROFILLE?
end)
while true do
task.wait(10)
print(profile:IsActive())
end
print(profile)
end