How to make a clear map system?

Hello!
I am trying to make a clear map system like in talent show.
There is a folder in lighting called maps and when i click on a text button, it will put all maps in the folder that are in workspace. How do i make it?
Like this but more simple

local Folder = game.Lighting.Folder
script.Parent.MouseButton1Click:Connect(function()
	game.Workspace.Climbobby.Parent = Folder
end)
script.Parent.MouseButton1Click:Connect(function()
	game.Workspace.Comedy.Parent = Folder
end)
script.Parent.MouseButton1Click:Connect(function()
	game.Workspace.DeathRope.Parent = Folder
end)

hi :slight_smile: if you to move maps folder to work space by clicking text button put script in textbutton and do that

script.Parent.MouseButton1Down:Connect(function()
	game.Lighting.maps.Parent=game.Workspace
end)

Try this code out:

local button = -- reference button
local folder = -- reference folder in lighting

button.MouseButton1Down:Connect(function()
	for _,v in ipairs(folder:GetChildren()) do
		local clone = v:Clone() do
			clone.Parent = workspace
		end
	end
end)

Something to note about this though, it will only clone the maps on the client. If you want it to replicate and show up to everybody, you can use a RemoteEvent and do the for loop on the server.

2 Likes