1. What do you want to achieve?
I want to understand what value the Player.DisplayName
property returns when a player has not set a custom display name. Does it default to their Player.Name
, or something else?
2. What is the issue?
I’m unclear about how Player.DisplayName
behaves when the feature is unused by a player. This can impact how I display names in my game, especially if I want to show display names in some areas and usernames in others. Here’s a sample code block I’m working with:
local player = game.Players.LocalPlayer
print(player.DisplayName)
I’ve seen both Player.Name
and Player.DisplayName
being used interchangeably, but I want to clarify the behavior when DisplayName
is not set.
3. What solutions have you tried so far?
I’ve looked through the Developer Hub but haven’t found clear documentation on what happens if a player hasn’t configured a display name. I’d like to understand the default behavior across various accounts.