Random Player selection (with style)

You can write your topic however you want, but you need to answer these questions:

  1. I want to make a random map selection for my game, something like this:


Sorry for no sound

  1. I searched the Developer Hub but didn’t find anything :pensive:

Do you want it to pop up like that and constantly change the selection or do you just want it to quickly select a random map?

1 Like

Yep like that, like in the video :sunglasses:

1 Like

Here is a script that picks a random one, you would be better off just using a folder of maps instead of a table

local mapsToSelect = {"Map1","Map2","Map3","Map4","Map5","Map6"}
local selectedMap

local selectionDelay = 0.15
--it doesn't seem like it slows down as it gets closer to selecting a map, could just be blind.
local selections = 10
for i = 1,selections do
    selectedMap = mapsToSelect[math.random(#mapsToSelect)]
    print(selectedMap)--I am super lazy and don't want to make a gui to explain this, all you realistically have to do is set the gui text to this
    task.wait(selectionDelay)
end
warn(string.format("Final map selection: %s",selectedMap))
2 Likes

Thank you! that was exactly what I was trying to do :heart:

2 Likes