What i want to achieve is that one of the words within the table will only show once on the textlabels.
This is not really what i wanted to achieve, i know i did it wrong, but i cant really find a way to make it work, This is what i currently have. And the code i will post below
local ChaosVeroorzakers = {
"Werk",
"Persoonlijke Zaken",
"Jesse",
"Boodschappen",
"Agenda",
"Boeken",
"Winkelen",
"Slapen"
}
textButtons.Text = tostring(ChaosVeroorzakers[math.random(#ChaosVeroorzakers)])
So you want it where if a string shows on a TextLabel once, you want it to be excluded from showing on others?
I want to grab all the strings from the table and put it on the textlabels. But i only want it to appear once
Try this:
local ChaosVeroorzakers = {
"Werk",
"Persoonlijke Zaken",
"Jesse",
"Boodschappen",
"Agenda",
"Boeken",
"Winkelen",
"Slapen"
}
local randomnumber = math.random(1,#ChaosVeroorzakers)
textButtons.Text = tostring(ChaosVeroorzakers[randomnumber])
table.remove(ChaosVeroorzakers,randomnumber)
Also, you may have to add more strings to prevent an error
system
(system)
Closed
November 25, 2022, 7:30pm
5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.