GlobalUpdates
This item only works when running on the server. Server
Used to add, lock and change global updates.
Revealed through :PostGlobalUpdate().
Types
GlobalUpdateData
type GlobalUpdateData = anyGlobalUpdates
Id is the most recent update index.
Functions
AddGlobalUpdate
GlobalUpdates:AddGlobalUpdate(globalUpdateData: any) → Promise<number>Adds a global update to the Keep.
store:PostGlobalUpdate(function(globalUpdates)
globalUpdates:AddGlobalUpdate({
Hello = "World!",
}):andThen(function(updateId)
print("Added Global Update!", updateId)
end)
end)
ChangeActiveUpdate
GlobalUpdates:ChangeActiveUpdate(updateId: number,globalUpdateData: any) → Promise<()>Change an active global update's data to the new data.
Useful for stacking updates to save space for Keeps that maybe receiving lots of globals. Ex. a content creator receiving gifts.
RemoveActiveUpdate
GlobalUpdates:RemoveActiveUpdate(updateId: number) → Promise<()>Removes an active global update.
local updates = globalUpdates:GetActiveUpdates()
for _, update in updates do
globalUpdates:RemoveActiveUpdate(update.Id):andThen(function()
print("Removed Global Update!")
end)
end
GetActiveUpdates
Types
Returns all active global updates.
local updates = globalUpdates:GetActiveUpdates()
for _, update in updates do
print("ActiveUpdate data:", update.Data)
end