I've written the following code to continuously loop sting values, repeating in the same order infinitely. I was just curious if there was any way to write lines 6 through 13 more effectively?
local message = script.Parent
local myArray = {"Hello, there.", "General Kenobi!", "I am the Senate.", "Not... yet."}
while true do
message.Name = myArray[1]
wait(3)
message.Name = myArray[2]
wait(3)
message.Name = myArray[3]
wait(3)
message.Name = myArray[4]
wait(3)
end

1 comment
Thanks!