-
What do you want to achieve?
I would like to automatically change the text when the array changes -
What is the issue?
As you can see with the script and the video, the value of the text doesn’t change at all, even tough the script is supposed to change (shown when I play the 2nd time) -
What solutions have you tried so far?
I’ve tried checking on the wiki but nothing seems to be like my issue. I believe it has something to do with Text.Changed but i’ve no clue if I’m going in the right path.
This is the original script:
local function changeText()
for i, v in pairs(rankArray) do
local index
index = i
local nextRank = index + player.IndexValue.Value
local currentRank = nextRank - 1
print(v[nextRank].Name.." This is the next rank")
print(v[currentRank].Name.." This is the current rank")
currentRankName.Text = v[currentRank].Name
currentBoostDelayText.Text = (v[currentRank].BoostTime.. " Seconds")
currentCrownMultiplyText.Text = ("x"..v[currentRank].MultiplierCrown)
currentTimeMultiplyText.Text = ("x"..v[currentRank].MultiplierTime)
nextRankName.Text = v[nextRank].Name
nextBoostDelayText.Text = (v[nextRank].BoostTime.. " Seconds")
nextCrownMultiplyText.Text = ("x"..v[nextRank].MultiplierCrown)
nextTimeMultiplyText.Text = ("x"..v[nextRank].MultiplierTime)
end
end
local RankUpModule = {
AllRanks = {
[1] = {
Name = "Noob",
MultiplierTime = 1,
MultiplierCrown = 1,
BoostTime = 30,
},
[2] = {
Name = "Beginner",
Price = 12500, -- 12.5k
MultiplierTime = 2.5,
MultiplierCrown = 1.25,
BoostTime = 28,
},
[3] = {
Name = "Pro",
Price = 90000, -- 90k
MultiplierTime = 7,
MultiplierCrown = 1.5,
BoostTime = 26,
},
[4] = {
Name = "Masterful",
Price = 325000, -- 325k
MultiplierTime = 18,
MultiplierCrown = 1.75,
BoostTime = 24,
},
[5] = {
Name = "Powerful",
Price = 915000, -- 915k
MultiplierTime = 43,
MultiplierCrown = 2,
BoostTime = 22,
},
[6] = {
Name = "Master Mind",
Price = 2500000, -- 2.5m
MultiplierTime = 95,
MultiplierCrown = 2.25,
BoostTime = 20,
},
[7] = {
Name = "Bluethoot",
Price = 8650000, -- 8.65m
MultiplierTime = 232,
MultiplierCrown = 2.5,
BoostTime = 19,
},
[8] = {
Name = "Deez Nuts",
Price = 17500000, -- 17.5m
MultiplierTime = 411,
MultiplierCrown = 2.75,
BoostTime = 18,
},
[9] = {
Name = "1234Test1234",
Price = 54250000, -- 54.25m
MultiplierTime = 777,
MultiplierCrown = 3,
BoostTime = 17,
},
[10] = {
Name = "Break The Game",
Price = 14150000000000, -- 14.15T
MultiplierTime = 99999,
MultiplierCrown = 99,
BoostTime = 3,
},
}
}