Hello,
I have made a code which needs to randomize questions and the question that has been selected has text in it and that specific text needs to be in the textlabel and textbutton.
But I don’t know how I can put the text that needs to that question and put it into the textlabel and textbutton.
Here’s the script and maybe that will clearify what I mean:
local A = script.Parent.Parent.A
local B = script.Parent.Parent.B
local C = script.Parent.Parent.C
local D = script.Parent.Parent.D
local question = script.Parent
local question1 = {
[0] = {
content = "",
answers = {1,2,3,4},
correct = {1}
},
answers = {
[1] = {
content = "",
},
[2] = {
content = "",
},
[3] = {
content = "",
},
[4] = {
content = "",
}
}
}
local question2 = {
[0] = {
content = "",
answers = {1,2,3,4},
correct = {1}
},
answers = {
[1] = {
content = "",
},
[2] = {
content = "",
},
[3] = {
content = "",
},
[4] = {
content = "",
}
}
}
local question3 = {
[0] = {
content = "",
answers = {1,2,3,4},
correct = {1}
},
answers = {
[1] = {
content = "",
},
[2] = {
content = "",
},
[3] = {
content = "",
},
[4] = {
content = "",
}
}
}
local question4 = {
[0] = {
content = "",
answers = {1,2,3,4},
correct = {1}
},
answers = {
[1] = {
content = "",
},
[2] = {
content = "",
},
[3] = {
content = "",
},
[4] = {
content = "",
}
}
}
local question5 = {
[0] = {
content = "",
answers = {1,2,3,4},
correct = {1}
},
answers = {
[1] = {
content = "",
},
[2] = {
content = "",
},
[3] = {
content = "",
},
[4] = {
content = "",
}
}
}
local question6 = {
[0] = {
content = "",
answers = {1,2,3,4},
correct = {1}
},
answers = {
[1] = {
content = "",
},
[2] = {
content = "",
},
[3] = {
content = "",
},
[4] = {
content = "",
}
}
}
local question7 = {
[0] = {
content = "",
answers = {1,2,3,4},
correct = {1}
},
answers = {
[1] = {
content = "",
},
[2] = {
content = "",
},
[3] = {
content = "",
},
[4] = {
content = "",
}
}
}