I used the ROBLOX Studio Capture the Flag place for the basics of the game, but I want the game to be able to change maps during intermission. Is there a way to do this with the current ROBLOX Capture the Flag place? Do I need to add a new script? And if I do, how is this gonna effect how the game how it is now?
COMMUNITY QUESTION
Trying to add a map chaging script to my CTF game, need some help?
1 answer
You would need a script, but never fear, I made one! To make this work, your gonna need a little bit of programming skill, but if you do your good. This will insert a random map from "lighting". This means place all your maps in "lighting". I'll let you make the rest of the game mechanics yourself. :)
function chooseNewMap()
local hint = Instance.new("Hint", workspace)
hint.Text = "Selecting new map."
wait(1)
hint.Text = "Selecting new map.."
wait(1)
hint.Text = "Selecting new map..."
wait(2)
local curMap = game.Lighting:children()[math.random(1,#game.Lighting:children())]
hint.Text = "Map selected: "..curMap.Name
wait(3)
insertMap = curMap:Clone()
insertMap.Parent = game.Workspace
hint.Text = "Map inserted."
wait(4)
hint:Destroy()
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Thanks haha, I'll let you know how it goes !