How do you do the thing like camping they choose a random player to talk in gui how do i do this (help)?
COMMUNITY QUESTION
How do you make a random person talk in gui?
1 answer
If your asking how to get a random player, this is it.
math.randomseed(tick())
if #game.Players:GetPlayers() > 0 then
local rand = math.random(1,#game.Players:GetPlayers()) -- The # is used to get the amount of inputs in a table.
local randomplayer = game.Players:GetPlayers()[rand] -- Returns an objectvalue for player.
print(randomplayer)
end
Please note, put this script inside a function or a disabled script, as when you press test, or on Roblox itself, the server starts before the client, and before the client joins the script would have already ran.
(Tested and works)
Now as for setting up a GUI, you will just have to use the information from the player to create it.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
You mean a dialog system?
no the gui