I was wondering if anyone can help
local remoteEvent = waitForChild(game:GetService("ReplicatedStorage"), "Event")
local mapsStorage = waitForChild(game:GetService("ServerStorage"), "Maps"):GetChildren() -- I want this bit to randomly choose a map instead of only choosing the first one
local playersService = game:GetService("Players")
function minigameModule.isPotentialGame()
return playersService.NumPlayers >= settingsModule.minimumPlayers
end
function minigameModule:chooseMap()
local chosenMap = mapsStorage[#mapsStorage]:Clone()
if findFirstChild(chosenMap, "Spawns") then
chosenMap.Parent = workspace
chosenMap:MakeJoints()
self.currentMap = chosenMap
return chosenMap
end
end

2 comments
Thank you!
But for some reason it chooses the map then kills me instantly after teleporting me?