So I am making a shedletsky npc that shoots a laser gun the problem Is where the talking scripts only works If there Is only one phrase there
Script:
local NPC = script.Parent
local phrases = {
"Get pwnd!"
"Your gotta duel me? ROLF!!!"
"Never got PWND, and never will!"
"ROLF"
"Man the way imnotaguest1121 programmed me ngl"
"GG, but I always win!"
"Hey guys! Shedletsky here and I'm gotta PWND a user!"
"imnotaguest1121! Buff me!"
"Shedletsky Is here!"
}
while wait(1) do
game:GetService("Chat"):Chat(script.Parent.Head, phrases[math.random(1, #phrases)], Enum.ChatColor.White)
end

1 comment
This is an easy fix, just add a comma, or semi-colon after each phrase to separate them. You should consider reading about tables: https://developer.roblox.com/en-us/articles/Table