local mapStorage = game.ServerStorage.Maps:GetChildren()
local chosenMap = mapStorage[math.random(1, #mapStorage)]
chosenMap.Parent = workspace.CurrentPlaying
print("Map chosen is; "..chosenMap.Name.." Map")
local touchMapDie = chosenMap:GetChildren()
for i, v in pairs(game.Players:GetPlayers()) do
touchMapDie.Touched:Connect(function(hit)
hit.Parent.Humanoid.Health = 0
end)
end
So Basically, a random map generates, then when the players touch that map (every single part of the map), They are supposed to die

3 comments
At line 10 put if v.touchmapDie.Touched:Connect(function(hit) then
Still, it doesn't work @JesseSong
Check my answer :D