How would I change the MaxDistance of the chat in this chatting NPC script? I’m having trouble with this… Examples would be great as I am not much of a scripter!
local Chat = game:GetService("Chat")
local NPC = workspace.BPNPC.Jisoo
Chat:Chat(NPC.Head, "Hi!!", Enum.ChatColor.White)
It would probably be in the properties. Probably named something like “MaxDistance”.
This is a dialogue right?
This is a bubble chat setting. You will need to fork the chat module (if you’re using legacy mode) to accomplish this. Otherwise, you can change the bubble chat settings in studio.
Are you using Dialogs, or what did you plan to use?
If it is an Dialog, this is what you are looking for:
Tho, in TextChatService > BubbleChatConfiguration there is a thing called MaxDistance and MinimizeDistance. Those will probably apply for everyone’s chats then.
To change the maximum distance at which the chat message can be heard, you can use the
Chat:SetMaxDistance function and pass in the desired maximum distance as an argument. For example:
This would set the maximum distance for the chat message to 50 studs. The default maximum distance is 100 studs.
You can also pass in an additional argument to specify the maximum distance for whispers. For example:
Chat:SetMaxDistance(NPC.Head, 50, 10)
This would set the maximum distance for regular chat messages to 50 studs, and the maximum distance for whispers to 10 studs.
Keep in mind that the maximum distance values are in studs, and that they are relative to the position of the chat sender (in this case, the NPC’s head).
Where would I add this? I tried adding it before the function, but that makes the bubble chat disappear completely, and I tried adding it inside the function and it also makes it disappear.