PcoWSkbVqDnWTu_dm2ix
Collapse Sidebar

GetUserIds

This function returns an array of Player/UserId|UserIds tagged with the object. This information is useful for adhering to GDPR policies.

See Also

  • Articles/Data store|Data Stores, an in-depth guide on data structure, management, error handling, etc.

Returns

Return Type Summary

An array of Player/UserId|UserIds associated with the object.


Code Samples


Get User IDs for Key

local DataStoreService = game:GetService("DataStoreService")

local experienceStore = DataStoreService:GetDataStore("PlayerExperience")
 
local success, currentExperience, keyInfo = pcall(function()
	return experienceStore:GetAsync("User_1234")
end)
if success then
	print(currentExperience)
	print(keyInfo:GetUserIds())
end