of     1   

Curosity
#183794900Wednesday, February 17, 2016 1:51 AM GMT

So, I have two gui buttons, and I want to set their text to something different every time. Like, I want to have two different sentences in each of them, but have them grouped together... It's kind of hard to explain so ill give an example So, my first gui has "hi" and the second has "hello" I have a ton of different "sets" of text, and I want to randomly change the "sets" of guis each time I press the button. So I press the first button and it changes to "hello from the other" and the other says "side", but it could've changed to a load of other "sets of text" i'm sorry if this is confusing, but I need to know how to do this. Thanks for any help.
Curosity
#183795653Wednesday, February 17, 2016 2:00 AM GMT

bumperino
Curosity
#183796880Wednesday, February 17, 2016 2:16 AM GMT

p-please...
eleye
#183797971Wednesday, February 17, 2016 2:29 AM GMT

Make a folder and put all of the text buttons in it. Put this script in all of the text buttons script.Parent.MouseButton1Click:connect(function() script.Parent.Visible = false local gui = script.Parent.Parent local chosengui = gui[math.random(1, #gui)] chosengui.Visible = true end)
Curosity
#183799516Wednesday, February 17, 2016 2:49 AM GMT

Thanks for the reply, but I get this error: Players.Player.PlayerGui.hi.Choice2.Script:4: attempt to get length of local 'gui' (a userdata value) Also, what I want is to change the text of two dominant text buttons whenever they are clicked. But I want to have the text in pairs, so one text has a certain word and the other has another word, but these two words are linked together in the random, if that makes since. Its like this game http://either.io/1216/the-price-of-fame please help~
eleye
#183800496Wednesday, February 17, 2016 3:04 AM GMT

script.Parent.MouseButton1Click:connect(function() script.Parent.Visible = false local gui = script.Parent.Parent:GetChildren() local chosengui = gui[math.random(1, #gui)] chosengui.Visible = true end)

    of     1