How do I get the list of creators, I know that there is game.CreatorId, but it takes only the main developer’s id, but I also want to get developers that have access to edit my game.
What I want to achieve is:
local devList = {}
--get all the devs into the table, for next manipulation with IDs
I’m using this list to make a custom icon in Gui above the dev’s avatar icon and also giving the icon custom design.
local Developers = {
[1] = true,
[2] = true,
}
local function isDeveloper(Player: Player)
local Id = Player.UserId
return Developers[Id] == true
end
return {
isDeveloper = isDeveloper
}
ServerScript:
local Developers = require(path)
game.Players.PlayerAdded:Connect(function(player)
if Developers.isDeveloper(player) then
print(player.Name .. " is a developer.")
else
print(player.Name .. " is not a developer.")
end
end)
This is a basic example that you can use for do it
This is the closest I could get to a dynamic solution:
type dev = {id: number, name: string, displayName: string}
--the cookie must belong to a user that has team-create access for that placeId
local function getDevList(placeId: number, cookie: string): {dev}
--it's highly recommended to use your own proxy when dealing with authentication cookies
--roproxy used for demonstration
local url = "https://develop.roproxy.com/v1/places/%d/teamcreate/active_session/members?limit=100"
cookie = ".ROBLOSECURITY="..cookie:split("=")[2]
local cursor = ""
local devs = {}
while cursor do
--The GetAsync call may error, you can implement your own retry logic here
local response = game.HttpService:GetAsync(url:format(placeId), nil, {Cookie = cookie})
local data = game.HttpService:JSONDecode(response)
for _, dev in pairs(data.data) do table.insert(devs, dev) end
cursor = data.nextPageCursor
end
return devs
end
local cookie = "YOUR ROBLOX SECURITY COOKIE"
local placeId = 0 --replace with your place id
local devs = getDevList(placeId, cookie)
for _, dev in pairs(devs) do
print(dev.id, dev.name, dev.displayName)
end
Although it’s highly recommended to just have a hardcoded list for your game devs, or give them a dev role in your game group, so you don’t have to mess with authentication and such.