I’m looking for a way to tell if a user is a game developer of a certain game, like if there are multiple developers allowed edit access to a single game. My problem is I can’t find out how to do so. I’ve tried looking over the Developer hub, these DevForums, and online.
I’m making my own leaderboard, and I want to add this icon infront of any user who’s a developer of my games.
Like if there were multiple developers, each one would have that icon infront of the player name.
EDIT:
I want no user to have to edit the original script. I want it to simply be added to a game, and let the script figure out who is who.
local devs = {} --put your developer's UserIds' here
game.Players.PlayerAdded:Connect(function(player)
if table.find(player.UserId, devs) then
--icon code here
end
end)
Local Developers = {"username1","username2"}
game.Players.PlayerAdded:Connect(function(player)
if table.find(player.Name,Developers) then
--Do stuff
end
end)
(@sniper74 's method will work too and maybe even better)
well, your method works too, but I would recommend using UserId’s instead of names as if they ever change their name, the name is available to someone else and they would get the icon.
Another relatively simple solution if all your Developers are in a group, is fetch the specific group rank. And has that as the condition, it should be pretty easy to give the developers that icon.
And in case you aren’t sure how to do that, here’s an example :
game.Players.PlayerAdded:Connect(function(player)
if player:GetRankInGroup(YourGroupId) == DeveloperRank then
-- Give Icon
end
end
Just try to make it as easy as possible, you could have a seperate ModuleScript with a configuration where they could put in the developers of the game.
--[[
Some general information on how to add another user
could go here
--]]
return {
{UserId = 1};
{UserId = 2};
}
I’m trying to figure out if a user is a developer of a certain game. Owners show up with the same image as those who develop the game, and that’s what I want to replicate across my leaderboard. I want people to see that the user develops the game. It is a matter of the Roblox sessions, and not manual scripting.
I want to be able to do this without manual scripting, and automatically add it without touching the scripts at all.
I don’t think this can be done totally without scripting, I checked through the Roblox API Endpoint Docs a few times, but couldn’t find something like that. Your best option would be to probably go with something like others have suggested – By Comparing their Group Rank. Anyways, you don’t need advance knowledge for that, just need to insert that Rank to a table.
I did some API Endpoint Doc searching as well. I don’t think its possible for the game to recognize the userdata unless it has the token for those users themselves. I think you guys might be right about that, but I still want to have feedback on this topic, because I am eager for a solution.
To make it as simple as possible, I can only think of this way:
local groupId = 000000
local developerRoles = { "Programmer", "Builder" }
game.Players.PlayerAdded:Connect(function(player)
if developerRoles[player:GetRoleInGroup(groupId)] then
-- Do what you want to do.
end
end