[LUA] Random text in frame?

Can I make in frame random text?

1.Nice (or)
2.Good (or)
3.Ok (or)

And from that list in frame player see one of this text?

PlayerText.title:SetText(“…”);

local texts = {"Nice", "Good", "Ok"}
PlayerText.title:SetText(texts[random(1, #texts)])

It’s not a big sample so there’s a good chance of repeats and possibly many of the same in a row.

1 Like

I was thinking to add different texts for different races. So every race will have different set or random dialogs. I was looking in google how to do this and checking code of different addons but… I only know is I need use raceid and put races in lua.
And is working nice for 3D player model where i can manipulate every race model, but I can’t make this for text :frowning: