How do I change the string value "Text" in "TextLabel"?
Im trying to make a death screen thing where when you die it chooses random text. Heres the string randomizer script i have
01 | local RandomNumber = math.random( 1 , 20 ) |
03 | "Well, you died. That sucks, try again." , |
04 | "Stop dying! This is boring to watch!!" , |
05 | "You didn't even survive.. lame.." , |
07 | "You'd still be alive if you got off that damn phone" , |
08 | "Oof. Now you gotta do it all over again." , |
09 | "This is dissapointing." , |
10 | "If you die again, then you die. But I recommend you dont die." , |
11 | "I hope you learned from your mistake" , |
12 | "You died for a reason, noob" , |
13 | "Huh, something just stopped. Oh, it was your heart" , |
15 | "hahaahahahahahhahahhahahahaha" , |
16 | "Wow that was great! (said no one) " , |
17 | "Its fun to watch you continuously fail and fail" , |
18 | "Your character infinetly falls into the void" , |
19 | "Hey loser, you died" , |
20 | "My dissapointment is immeasurable and my day is ruined" , |
21 | "You had a good life. Until you pathetically died." , |
22 | "You died, but look on the bright side! You get infinite tries" , } |
23 | local FinalMessage = (Responses [ RandomNumber ] ) |
-so theres a variable that chooses a random number between 1 and 20
-a variable that is a table that has 20 different string values
-a variable called FinalMessage which is the responses and the random number choosing a random value
so then i try this
1 | game.StarterGui.DeathGui.Frame.TextLabel.Text = FinalMessage |
the script is in ServerScriptStorage idk if that makes a difference
when it runs the text doesnt change
so thats it.