might seem wierd, but i actually need to know this before making datastores, because in the UK, you legally have to remove someone from the datastores if they get banned off the site. so lets say someone from the UK plays the game and gets banned from roblox for some reason, i would have to manually remove thier data from the data store, might seem like not that much of a pain at first glance, but when the game gets popular, thats when things are gonna get harder, because that means more banned people, basically meaing no breaks. if i can get a system to automatically do this for me, then please tell me how. thanks!
SOLUTION:
local Players = game:GetService("Players") local cache = {} function getUsernameFromUserId(userId) if cache[userId] then return cache[userId] end local player = Players:GetPlayerByUserId(userId) if player then cache[userId] = player.Name return player.Name end local name pcall(function () name = Players:GetNameFromUserIdAsync(userId) end) cache[userId] = name return name end if getUsernameFromUserId(4) == nil then print("they gone") end