Is it possible to change the chat speakers name without it affecting everyone else?

Lets say for example, I wanted to create a group. And everyone in that group would have they’re speaker name set to “[REDACED]” but everyone who wasn’t in the group would have their name be normal.

Before you go at me with this, yes I know there have been similar posts before, but none pertaining to this in particular. This one affects everyone in the game, I have tried it and I can’t seem to find a way around it. This one was kinda hard for me to follow, honestly, so if you could dumb it down for me, I would thank you in advance!

Could this be possible or achievable, I thank you for taking the times to read this and I thank you for the help in advance! :smile:

It isn’t possible to modify the speaker’s name but you can modify the label by forking the chat scripts. Then do an if statement ex. (if button.Text == '[ROBLOX]' then). Problem is that this would override their names if they’re using a display name. But you could also just get a fork pre-display names.

I see, where would this line of code be place though, I’m guessing somewhere in the default chats module?

Yeah, it would be inside of the default chat modules.

Just do ctrl+shift+f and search "[%s and it will bring up all of the mentions of formatted strings (which includes usernames). You’d have to modify each script individually.

I’ve tried this before and tested it with a friend and it would override his username as well, instead of just mine.

Weird. Did you try making an if statement to check if the button’s text was [Valuent]?

I’ve also run into the unreliability of using this as I was creating multicoloured chat tags and sometimes the whole chat would go rainbow. It’s also kind of hard to read the chat modules which sucks.

This is what you mean correct?

local formatUseName

	if speakerName == "SNACKRR"  then
		formatUseName = string.format("[%s]", "Robux")
	else
		formatUseName = string.format("[%s]", "No robux")
	end

Yeah.

Try something like this, post-format.

   if ChatSettings.PlayerDisplayNamesEnabled and messageData.SpeakerDisplayName then
		formatUseName = string.format("[%s]:", speakerDisplayName)
	else
		formatUseName = string.format("[%s]:", fromSpeaker)
	end
    if formatUseName == '[SNACKRR]:' then
        formatUseName = '[Robux]:'
    else
        formatUseName = '[No robux]'
    end

Ahh, I see what you’re going for, sadly, there’s an error @ speakerDisplayName, saying the following: string expected, got nil. speakerDisplayName is underelined red, did you mean extraData.DisplayName?

Are you using an old fork? If so, it’s likely display names weren’t out when your version was forked. You would have to just do something like that, create a variable in the scope of both if statements and then check if the string is equal to something. If so, then change it if that makes sense.

To be honest, not really, that doesn’t make sense, I apologize, not very fluent with chat API. Also how would I tell if it’s an old fork, would it be by the creation of the game or simply when I forked it?

Nah, don’t apologize. Nothing to be sorry for haha, probably my explanation.

So before you added that if statement, it likely looked something like this, right?

    local formatUseName
	formatUseName = string.format("[%s]", speakerName)

So, add another if statement

    local formatUseName
	formatUseName = string.format("[%s]", speakerName)

    if formatUseName == '[SNACKRR]' then
        formatUseName = '[Robux]'
    else
        formatUseName = '[No robux]'
    end

I see, thank you thank you, it works, but I don’t believe this would work locally would it, since it’s housed in a module script?

Nevermind, ignore my stupidity, it works perfectly, thank you very much!