How to display text from a table onto a textlabel

Heya!

I’m trying to create Roblox’s easiest update log. So i created a table with the update features and i am trying to apply one feature to a textlabel. How can i do this?

Thanks!

2 Likes

Can you show us the current script/table you have? You should be able to just do something like this:

TextLabel.Text = Table.YourValue

2 Likes

Hello!

Since you didn’t provide us with how your table script looks, I will give you a blank example of how you can do this.

Let’s state the variables first.

local updateTable = {
     value1,
     value2,
     value3
}

local TextLabel = -- Route to the TextLabel here

Now, let’s set an individual value from the table as the Text property of the TextLabel.

TextLabel.Text = updateTable[1]

The [] number value identifies the exact individual value of the table. [3] would return value3.

This should do the trick. Obviously, you can implement it into other functions as well, if you wish to do so. An example of one, Text change on TextButton mouse click:

local TextButton = -- Route to the TextButton here

TextButton.MouseButton1Click:Connect(function()
    TextLabel.Text = updateTable[1]
end)
2 Likes

I think the author’s goal is to list the features from the table. In that case, @Scxiptifyz you should do this:

local prefix = "-"
local changes = {
	"Fixed some bugs",
	"Added something",
	"Some other change"
}

local label = script.Parent.Changes
label.Text = `{prefix} {table.concat(changes, `\n\n{prefix} `)}`

Screenshot 2024-01-05 at 8.24.30 pm

1 Like

Heya!

I’m not sure why this post is here. I Don’t remember creating it. Anyways, i have already fixed the issue. Its a bit weird why this is here but i will delete it shortly. Thanks anyway :smiley:

Thanks for the reply! I Didn’t know you could do it like that. That’s quite a good idea!

Psst: Love your content btw :slight_smile:

1 Like

This is what i first tried, however, i needed to list them all. not just one

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.