I want to make a player’s display name show for everyone including the client, but I can’t figure out how.
I’ve tried changing the DisplayDistanceType but it hasn’t helped.
I need to do this because I am adding a roleplay name gui to my game and I want the player to be able to see their own roleplay name.
Heres my code:
local script:
local Game, ReplicatedStorage = game, game:GetService("ReplicatedStorage")
local Event = ReplicatedStorage:WaitForChild("String")
script.Parent.FocusLost:Connect(function(EnterPressed)
if not EnterPressed then return end
Event:FireServer("Nickname", {script.Parent.Text})
script.Parent.Text = "Name_Here"
end)
server script:
wait(1)
local Game, ReplicatedStorage = game, game:GetService("ReplicatedStorage")
local Event = ReplicatedStorage:WaitForChild("String")
Event.OnServerEvent:Connect(function(plr, Request, Data)
local St = game:GetService("Chat"):FilterStringForBroadcast(Data[1], plr)
local char = plr.Character or plr.CharacterAdded:Wait()
if Request == "Nickname" then
local Humanoid = plr.Character.Humanoid
Humanoid.DisplayName = ""..St
end
end)