Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

The chat won't display, help?

Asked by
Resnex 60
10 years ago
while true do
    game:GetService("Chat"):Chat(head, ChatColor.Red, getRandomPhrase())
    wait(5)
end

This is a fragment of a script, I'm not sure why it can't display the Chat on the NPC's head. Can someone help me?

1 answer

Log in to vote
0
Answered by
wrenzh 65
10 years ago

You're mixing up the ChatColor and the message, and it is Enum.ChatColor.Red

game:GetService("Chat"):Chat(head, getRandomPhrase(), Chat(head, getRandomPhrase(), Enum.ChatColor.Red)

If this doesn't work, check out your function getRandomPhrase(). Make sure it's returning a string value.

Ad

Answer this question