What do you want to achieve? Keep it simple and clear!
Topic
What is the issue? Include screenshots / videos if possible!
Idk, i get only 1 instead of real amount
What solutions have you tried so far? Did you look for solutions on the Developer Hub? I tryed looking devforum
Code:
local Messages = {
["StoryParts"] = {
["Beginning..."] = {
["Messages"] = {
[1] = "In the world of full black...",
[2] = "Where nothing never would exist...",
[3] = "Suddenly appeared... you...",
[4] = "I can't understand what even are you...",
[5] = "Guess i need some more information about you...",
[6] = "Good luck with your goal in this empty world..."
}
}
}
}
function StoryMessages:GetCount(part)
local length = 0
for _,count in pairs(Messages["StoryParts"][part]) do
length += 1
end
return length
end
This is because when you are doing Messages["StoryParts"][part] you are only counting how many things are in the ["Beginning..."] table, assuming that the argument for part is Beginning...". If you’d like to get the amount of stuff within ["Messages"], then replace Messages["StoryParts"][part] with this instead: