Hello Dev Fourm
I Want to achieve to where on the legacy Chat Type I need it to be a different name NOT DISPLAY NAME Or USERNAME a whole different Name.
Could not find any videos or dev fourm posts
no solutions
i want it to be like this
Hello Dev Fourm
I Want to achieve to where on the legacy Chat Type I need it to be a different name NOT DISPLAY NAME Or USERNAME a whole different Name.
Could not find any videos or dev fourm posts
no solutions
i want it to be like this
Yes, using the SpeakerAdded
event:
local ChatService = require(game:GetService("ServerScriptService"):WaitForChild("ChatServiceRunner").ChatService)
ChatService.SpeakerAdded:Connect(function(speakerName)
local speaker = ChatService:GetSpeaker(speakerName)
if speaker then
speaker.Name = "idk" -- Set any name u want here
end
end)
This work but how would i do it to this scripts cuz now its not working
local ChatService = require(game:GetService("ServerScriptService"):WaitForChild("ChatServiceRunner").ChatService)
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(chr)
if chr:FindFirstChild("Head"):FindFirstChild("NameTag") then
ChatService.SpeakerAdded:Connect(function(speakerName)
local speaker = ChatService:GetSpeaker(speakerName)
print(speaker.Name)
if speaker then
speaker.Name = plr:WaitForChild("PData").FirstName.Value.."_"..plr:WaitForChild("PData").LastName.Value -- Set any name u want here
end
end)
end
end)
end)
im tryna make it to where when the player join it wait for this head tag to come and then it will set ur name in the chat accordingly there are no errors
Because the legacy chat doesn’t run under CoreGui there’re multiple ways to achieve this. Two of which including using the ChatService
API to grab the speaker object and change their name and also directly modifying the chat UI text(since it exists under PlayerGui).
Is there any errors, you also might want to add a slight wait in the first of the script.