Learn
Motor Sınıfı
GlobalDataStore
Oluşturulamaz
Çoğaltılmamış

*Bu içerik, yapay zekâ (beta) kullanılarak çevrildi ve hatalar içerebilir. Sayfayı İngilizce görüntülemek için buraya tıkla.


Özet
Yöntemler
IncrementAsync(key: string,delta: number,userIds: {any},options: DataStoreIncrementOptions):Variant
OnUpdate(key: string,callback: function):RBXScriptConnection
Artık Kullanılmayan
SetAsync(key: string,value: Variant,userIds: {any},options: DataStoreSetOptions):Variant
UpdateAsync(key: string,transformFunction: function):Tuple
Devralınan Üyeler

API Referansı
Yöntemler
GetAsync
Bekletir
Capabilities: DataStore
GlobalDataStore:GetAsync(
Parametreler
key:string
Varsayılan değer: "nil"
Dönüşler

IncrementAsync
Bekletir
Capabilities: DataStore
GlobalDataStore:IncrementAsync(
key:string, delta:number, userIds:{any}, options:DataStoreIncrementOptions
):Variant
Parametreler
key:string
delta:number
Varsayılan değer: 1
userIds:{any}
Varsayılan değer: "{}"
Varsayılan değer: "nil"
Dönüşler
Variant

OnUpdate
Artık Kullanılmayan

RemoveAsync
Bekletir
Capabilities: DataStore
GlobalDataStore:RemoveAsync(key:string):Tuple
Parametreler
key:string
Dönüşler

SetAsync
Bekletir
Capabilities: DataStore
GlobalDataStore:SetAsync(
key:string, value:Variant, userIds:{any}, options:DataStoreSetOptions
):Variant
Parametreler
key:string
value:Variant
userIds:{any}
Varsayılan değer: "{}"
Varsayılan değer: "nil"
Dönüşler
Variant

UpdateAsync
Bekletir
Capabilities: DataStore
GlobalDataStore:UpdateAsync(
key:string, transformFunction:function
Parametreler
key:string
transformFunction:function
Dönüşler

BatchGetAsync
Bekletir
Capabilities: DataStore
GlobalDataStore:BatchGetAsync(
keys:{any}, options:Dictionary
Parametreler
keys:{any}
options:Dictionary
Varsayılan değer: "nil"
Dönüşler
Kod Örnekleri
Batch retrieve player scores
local DataStoreService = game:GetService("DataStoreService")
local playerScores = DataStoreService:GetOrderedDataStore("PlayerScores")
local keys = {"Player_123", "Player_456", "Player_789"}
local success, results = pcall(function()
return playerScores:BatchGetAsync(keys)
end)
if success then
for _, key in keys do
local entry = results[key]
if entry then
print(key .. " : " .. tostring(entry.value))
else
print(key .. " has no saved entry")
end
end
end

©2026 Roblox Corporation. Roblox, the Roblox logo and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.