local list = {"Aunt","Big","Cap'n","Captain","Chef","Chief","Coach",
"Colonel","Cool","Crazy","Daring","Deputy","Dippy","Doctor","Dr.","Elvin","Elvis",
"Eddy","Earl","Fancy","Fat","Good ol'","Grand ol'","Granny","Grumpy","Judge","Lady","Little","Loopy",
"Loud","Lucky","Madame","Miss","Mrs.","Noisy","Princess","Prof.","Queen","Sheriff","Silly","Skinny",
"Super","Ugly","Weird"}
local titledown = script.Parent.TitleDown
local titleup = script.Parent.TitleUp
local curNum = 4 -- since we have start in the middle use 2
local max = #list
-- ref to the text labels all in order
local txt3 = script.Parent.TitleUp.Name_3-- This is ontop = top text label
local txt2 = script.Parent.TitleUp.Name_2
local txt1 = script.Parent.TitleUp.Name_1
local txt0 = script.Parent.TitleUp.Name0-- this is the middle text label
local txt_1 = script.Parent.TitleUp.Name1
local txt_2 = script.Parent.TitleUp.Name2-- This is below = bottom text label
function showTxt()
txt0.Text = list[curNum] -- the middle will always be accessible
txt2.Text = list[curNum + 2]
txt1.Text = list[curNum + 1]
txt_1.Text = list[curNum - 6]
-- some more advanced method
-- txt1.Text = list[curNum - 1] and list[curNum - 1] or list[max]
-- un tested but it used the logic shown here https://www.lua.org/pil/3.3.html
if list[curNum - 1] == nil then -- wouk out is we can do the logic
txt3.Text = list[max]
else
txt3.Text = list[curNum - 1]
end
if list[curNum + 1] == nil then
txt_2.Text = list[1]
else
txt_2.Text = list[curNum + 1]
end
end
titleup.MouseButton1Click:connect(function()
curNum = curNum + 1
if curNum > max then curNum = 1 end -- reset our number
showTxt() -- update the text
end)
titledown.MouseButton1Click:connect(function()
curNum = curNum - 1
if curNum <= 0 then curNum = max end -- again the reset
showTxt()
end)
showTxt()
Not sure what i did wrong here Kingdom5 but its not avting like it should anymore cri

1 comment
Let me try and fix this.