Hey, yes, it’s an overhead username & display name nametag. Took me like 2 minutes, lol.
Anyways, enjoy.
Preview:
Link for the model: Name Tag - Roblox
(yes, thank you Lua_Orb for the idea I saw on cool creations.)
Hey, yes, it’s an overhead username & display name nametag. Took me like 2 minutes, lol.
Anyways, enjoy.
Preview:
Link for the model: Name Tag - Roblox
(yes, thank you Lua_Orb for the idea I saw on cool creations.)
Yo, I have a similar thing in my game with display names as well, but is there a way to enable / disable the displayname header if the user does not have a DisplayName? By default the DisplayName would just be the same as the PlayerName if they don’t have one set, right?
I’m kinda just new to LUA so i’m not sure how to disable the label that contains the Displayname if they just don’t have one.
Yep, you can check if the player has a display name or not by if their username matches their display name.
For example, if the player’s Display name is their username, you can just disable the display name header, if their display name doesn’t match their username, you keep the display name header
I figured you can just do a check, but with how my headers are set up, I’m not sure exactly how I would go about that without either 2 things happening:
If it looks weird, nothing I can do about it. /shrug
You can just disable display names entirely though.
It’s up to you what do you.
Well, here’s what I was thinking:
header.Label.Text = "Level ".. level.Value
header.Label2.Text = "- ".. groupRole .. " -"
header.Label3.Text = player.DisplayName
header.Label4.Text = "@"..player.Name
So, this is how I have my labels stacked. Wouldn’t I just do some check where if the displayname and username are the same it would just disable the playername label?
Yeah, if a player hasn’t set their display name, it’s their username by default.
Alright, now new challenge for me is figuring out the syntax for matching the display (Label3) and playernames and then just “hiding” the playername label (Label4)
Good luck fellow comrade
I’m happy that I could help you out
I appreciate the help! If I can’t get this to work i’m just going to harass you with block of code.
I just realized I have no real way of testing to see if this works, most of my friends have display names.
if player.DisplayName == player.Name then
header.Label4.Text = nil
end
That should just hide it right?
I wouldn’t recommend setting the value nil as it might break, you can use a space though. Like " "
, and yes, it should work.
Yeah that’s true, thank you
I’ve only been learning LUA for like the last 2 weeks so everything is a struggle for me.