hi, im trying to make realistic fake chats like a game called “Fashion Diva” for my NPCs
i have 13 player names that will fake chat but for some reason it only fake chats 7 of them?
heres my code:
-- services
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local sss = game.ServerScriptService
local module = require(sss:WaitForChild('ChatServiceRunner').ChatService)
-- the msgs that the plrs will say
local messages = {
"hey guys anyone else having lag",
"i think i saw someone hacking but im not sure",
"lol did you see that epic fail",
"anybody wanna team up for a raid",
"omg this game is so addictive",
"has anyone found the secret room yet",
"im new here can someone help me out",
"watch out for RobloxAppV2 theyre really good",
"this game is awesome but it could use more updates",
"i keep getting disconnected is anyone else having this issue",
"i just found a rare item anyone interested",
"cant believe how fast time flies when im playing this game",
"i need to level up my character any tips",
}
-- make the msgs look more real
local function the_errors(message)
local fakerrors = math.random(1, 3)
if fakerrors == 1 then
message=string.gsub(message, "you", "u")
message=string.gsub(message, "youre", "ur")
end
return message
end
-- the name colors
local nameColors = {
Color3.fromRGB(253, 41, 67),
Color3.fromRGB(1, 162, 255),
Color3.fromRGB(2, 184, 87),
BrickColor.new("Bright violet").Color,
BrickColor.new("Bright orange").Color,
BrickColor.new("Bright yellow").Color,
BrickColor.new("Light reddish violet").Color,
}
-- the plr names
local speakers = {
"Lua_123",
"MTExMTQ0OTE2MzU5NTUx",
"OpenCIoudService",
"PacketPriority",
"Princesse_Overkill",
"RobloxAppV2",
"WWVVWVWVWVWVWWVVWVVW",
"XMailoX",
"cIoneref",
"derkaiser93",
"l_af",
"mymotherpunishedme",
"zdravkoski"
}
for i, name in ipairs(speakers) do
local speaker = module:AddSpeaker(name)
speaker:JoinChannel('All')
local randomC = nameColors[math.random(1, #nameColors)]
speaker:SetExtraData('NameColor', randomC)
local message = the_errors(messages[math.random(1, #messages)])
speaker:SayMessage(message, 'All') -- make the ppl say the msgs
end