I Am trying to achieve an NPC chatting a random text in a table, however. It only chats 1,2,3 ect. How can i fix this?
Code:
local ChatMessages = {"Great Story", "Your gonna make it big!", "That was so interesting!", "Teach me!"}
game:GetService("Chat"):Chat(friend.Head, math.random(1, #ChatMessages), Enum.ChatColor.Blue)
local ChatMessages = {"Great Story", "Your gonna make it big!", "That was so interesting!", "Teach me!"}
game:GetService("Chat"):Chat(friend.Head, ChatMessages[math.random(1, #ChatMessages)], Enum.ChatColor.Blue)