You can write your topic however you want, but you need to answer these questions:
-
I want to make a random map selection for my game, something like this:
Sorry for no sound
- I searched the Developer Hub but didn’t find anything
You can write your topic however you want, but you need to answer these questions:
I want to make a random map selection for my game, something like this:
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?
Yep like that, like in the video
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))
Thank you! that was exactly what I was trying to do