:Chat not functioning

So I want to make a part talk (I achieved it once before), until I found out that I couldn’t do it again. I tried to retype the code I made but still it didn’t work. I checked the output many times but there was no error. The code I used:

local chatService = game:GetService("Chat")
chatService:Chat(script.Parent, "Sample text")

Please help :frowning:

1 Like

Make sure that script.Parent is a BasePart. Also, it might be because there is a 3rd argument for :Chat() which is Color, so you could try:

local chatService = game:GetService("Chat")
chatService:Chat(script.Parent, "Sample text", "Red")

You should also make sure that Chat is not disabled in your game, like BubbleChat.
Read the API here

Nope, still doesn’t work.
character limit bruh

Have you put your code in a LocalScript or ServerScript?
If you use a LocalScript and you have parented it to a Part in workspace, it won’t work because LocalScripts don’t run in workspace. Try using StarterPlayerScripts as a parent for your LocalScript and then do:

-- LocalScript parented to StarterPlayerScripts
local Part = workspace.Part -- path to your part
local chatService = game:GetService("Chat")
chatService:Chat(Part, "Sample text", "Red")

Make sure you have these settings under the Chat service. Also check under Players → StarterPlayerScripts to see if anything is overiding chat. Make sure that you are using a Script, not a LocalScript, to run :Chat().
Capture

1 Like

I used a script and put it in the part I want to chat. I turned on everything in chat as well but it still didn’t work.