I am making a random text maker like it isnt the same text every time you get a mission it is random what mission you get i want it to take the info from a value in the replicatedstorage like Ob1, Ob2 they have the vaule like get a gun or so all the objectives are different but i cant get it to work.
So this is the script i have for now.
local sc = script.Parent local MainFrame = sc.MainFrame local Rep = game.ReplicatedStorage.Objectives local Texts = {Rep.Ob1.Value, Rep.Ob2.Value, Rep.Ob3.Value, Rep.Ob4.Value, Rep.Ob5.Value} MainFrame.Ob1.Text = math.random(1,#Texts)
Hello.
The issue is,you are assigning the Text of the Ob1 object inside of 'MainFrame' to a random number.
Here is the fixed lines of code:
MainFrame.Ob1.Text = Texts[math.random(1,#Texts)]
Make sure to mark this as the answer if it is what you were looking for!