Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why does my script not chat with the object?

So I'm trying to make an object chat and I used the chat service but It doesn't seem to be working, Can anyone help?

here's the code

local ChatService = game:GetService("Chat")
 
local part = Instance.new("Part")
part.Anchored = true
part.Parent = workspace
 
ChatService:Chat(part, "Blame John!", "Red") 

1 comment

0

Add 'wait(2)' above line 7

1 answer

✓ Accepted answer
local ChatService = game:GetService("Chat")

local part = Instance.new("Part")
part.Anchored = true
part.Parent = workspace

game.Players.PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(function(character)
		ChatService:Chat(part, "Blame John!", "Red") 
	end)
end)

It is chatting, but it's too fast. It chats immediately before the game loads. The script above will wait until your character loads into the game, then it chats.

This discussion is preserved as it was. New answers, comments, and votes are closed.