p = game.Players:Children()
player = p[math.random(1,#p)]
This is some of the code I've tried, I've tried a few others, and can't figure out a way. I want to randomly select a player, and then display it to the player in a GUI.
p = game.Players:GetChildren() for i = 1,#p do player = math.random(1,p[i]) end
This shall work, though a bit unnecessary .
if this answered your question check mark :)