Currently I’m working on a problem to choose a random array. I had a working system but it tended to be extremely faulty and honestly not the greatest at all.
I’d like to have a system where I can select the items within the random array as well… For example
UsersRandomArray[1] = “Blah blah” etc…
local Diagnostics = { -- ['Name'] = Symptom1, Symptom2, LeastPainlevel, MostPainLevel
['Common Flue'] = {"Mild Vomiting","Headache and Nausea",1,5};
['Allergic Reaction'] = {"Severe Cough","Swollen Eyes",1,4};
['Strep Throat'] = {"Trouble Breathing","Sore Throat",3,6};
['Stomach Bug'] = {"Vomitting or Harsh Coughing","Stomach Pains or Cramps",2,5};
['Jaundice'] = {"Fatigue or Nausea","Vomitting and weight loss",3,9};
['Pneumonia'] = {"Fever or Sudden Chills","Dehydration or Appetite loss",4,9};
['Mild Rash'] = {"Itching Skin","Bumps and Red Spots",1,4};
['Severe Rash'] = {"Severe Itching","Bleeding and White Rashes",2,6};
['Lung Buildup'] = {"Trouble Breathing","Severe Coughing",3,7};
['Ebola'] = {"Severe Bleeding in multiple locations","Loss of vision",8,10};
['Common Cold'] = {"Cough or Runny Nose","Headache and Nausea",1,5};
['Heart Failure'] = {"Seizures or Cramps","Dehydration",8,10};
['Broken Arm'] = {"Trouble moving arms","Trouble lifting objects",6,9};
['Broken Leg'] = {"Trouble walking or running","Trouble moving legs",6,9};
['Fractured Rib'] = {"Cramps and Sharp Pains","Trouble bending over",7,10};
['Brain Tumor'] = {"Severe Migraines","Trouble Sleeping",8,10};
['Strokes'] = {"Random loss of nerves","Stroking or loss of balance",7,10};
['Chicken Pox'] = {"Rashes or pimples on body","Severe Itching",3,7};
['Leukemia'] = {"Pain in bones or joints","Easily brusing",5,9};
['Asthma Attack'] = {"Hard to breath","Severe coughing",3,7};
['Lupus'] = {"Pain in the muscles","Sharp chest pain",4,10};
};
So ideally I could put this in a localscript, it’d give the user a certain diagnostic… then I could set the diagnostic symptoms to a textlabel etc…
Ex:
TextLabel.Text = UsersDiagnostic[1]
I attempted this----- and it returned nil
local UsersDiagnostic = Diagnostics[math.random(1,20)]
print(UsersDiagnostic)