Togglable Option for Display Names

As a Developer, it is currently hard to completely remove the functionality of Display Names. Forking chat is relatively easy, but Roblox does not provide the leaderboard to fork, nor other aspects of a game, making us learn how to do this and spend hours of work that we wouldn’t need. My simple solution is to allow Developers to toggle Display Names in their game, similarly to how R15/R6 work, or at least an easier way to override it (such as letting us set the Player.DisplayName property ourselves, rather than running into script permission errors).

This would be a very important feature, as many games rely on admin systems (such as kohls), or various other scripts they’ve coded to use Player.Name, rather than a Display Name. This feature would still work, but it’d make scripts less user friendly.

Assuming this issue can be addressed, I can spend time working on other aspects of my games, rather than diving into severely under documented areas of Roblox’s Core UI, and reinventing something that Roblox has already made for me.

28 Likes

I would have to concur with this post. As it currently stands, Display Names has caused severe confusion in a lot of role-play games I currently develop for. Masquerading and impersonation are among the two biggest issues we’re having at this time.

Several players have stated that this new feature has created confusion and is effecting their user experience. While the Display Name feature is not all bad, it would be preferred if this feature could be toggled in order to streamline the user experience on ROBLOX; not all games need this feature enabled by default.

6 Likes

It is currently impossible to disable DisplayNames from various elements of the CoreGui. My proposal is a property with the value Players.UseDisplayName, Roblox’s modules for both the player list and escape menu have a module that is dedicated to this specific function. It would be very easy to add a simple check in the middle.

Ammended RobloxGui.Modules.PlayerList.IsDisplayNameEnabled
local Players = game:GetService("Players")

local FFlagPlayerListUseDisplayName = game:DefineFastFlag("PlayerListUseDisplayName", false)
local FFlagPlayerListUseDisplayNameChina = game:DefineFastFlag("PlayerListUseDisplayNameChina", false)
local FFlagPlayerListUseDisplayNameChina2 = game:DefineFastFlag("PlayerListUseDisplayNameChina2", false)
local DeveloperEnabledDisplayNames = Players.UseDisplayName

local function isDisplayNameEnabled(subjectToChinaPolicies)
	if not DeveloperEnabledDisplayNames  then
		return false
	end

	if FFlagPlayerListUseDisplayName then
		return true
	end

	if FFlagPlayerListUseDisplayNameChina2 then
		return subjectToChinaPolicies
	end

	if FFlagPlayerListUseDisplayNameChina then
		return subjectToChinaPolicies
	end

	return false
end

return isDisplayNameEnabled

Ammended RobloxGui.Modules.Settings.UsePlayerDisplayName
local CoreGui = game:GetService("CoreGui")
local RobloxGui = CoreGui:WaitForChild("RobloxGui")
local Players = game:GetService("Players")

local PolicyService = require(RobloxGui.Modules.Common.PolicyService)

local FFlagOldInGameMenuDisplayNameForAll = game:DefineFastFlag("OldInGameMenuDisplayNameForAll3", false)
local FFlagOldInGameMenuDisplayNamePolicy = game:DefineFastFlag("OldInGameMenuDisplayNamePolicy3", false)
local DeveloperEnabledDisplayNames = Players.UseDisplayName

local function UsePlayerDisplayName()
	if not DeveloperEnabledDisplayNames then
		return false
	end

	if FFlagOldInGameMenuDisplayNameForAll then
		return true
	end

	if FFlagOldInGameMenuDisplayNamePolicy then
		return PolicyService:IsSubjectToChinaPolicies()
	end

	return false
end

return UsePlayerDisplayName```

This is about 8 extra lines in the Core GUI Modules, and yet Roblox have appeared to have completely disregarded the issue that some developers might just not want them on. The Chat appears to already be disableable through a setting (thank god)

ChatSettings Line 94-98

--[[ Display Names ]]

--Uses DisplayNames instead of UserNames in chat messages

module.PlayerDisplayNamesEnabled = false

--Allows users to do /w displayName along with /w userName, only works if PlayerDisplayNamesEnabled is 'true'

module.WhisperByDisplayName = false

Finally, for Humanoids themselves, you can use this

local Humanoid = script.Parent:WaitForChild("Humanoid")
Humanoid.DisplayName = ""
4 Likes

I don’t support this change.

Removing them for this reason alone seems like a knee-jerk reaction rather than a genuine solution. This is a very destructive solution no matter how you cut the cake. Is there a specific reason you avoided requesting that usernames are displayed in the leaderboard by default? That said, I also am curious as to what alternatives have you considered to flat out nuking the option to use this new feature.

I’m not asking for them to be removed. I’d ask you to please read the OP. I’m asking for a toggle. Enable Display Names by default and allow them to be toggled off.

I’ve tried writing to Player.DisplayName already. No luck there, as scripts are not given a high enough permission. I can write to the Humanoid.DisplayName, so that’s a non issue.

Point being, the game I’m specifically making has a number of in game chat commands, and you need to actually know who is who. Both in the chat, leaderboard AND infront of you. If display names are not unique and I said !ban “rock”, what do I do if there are 20 display names named rock. If I can’t see who is who, and I can’t rely on Display Names to identify users, then for my specific purposes I don’t want Display Names in this game at all.

7 Likes

I did read OP. In the context you gave me you are, for all intents and purposes, removing display names from your game.

I still think you should instead request a change to the leaderboard that comes stock to include @username if the concern is identifying people (and, of course, if just pausing the game is too much too - it does show there). Disabling the entire feature in your game for this reason alone just doesn’t sit right. It’s like cutting off someone’s entire finger because there’s a mole on it.

The other issues right now can be resolved with scripting, so I think there it’s OK. The concerns seem to just be focused on the leaderboard as far as I can tell since you can write a chat callback that edits the name field in the chat data table (you don’t even need to fork the chat), and a script that alters Humanoid.DisplayName – the leaderboard is the only one that requires a very large amount of work for such a small tweak. Roblox has provided standards for what these should look like, so chat messages could be altered to something like [Eti@EtiTheSpirit]: Hello, world! with your script, and humanoid names could be something like Eti\n(@EtiTheSpirit).

2 Likes