Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i make Map Changer ?

Help Please I'm new at this

3 answers

This is NOT a request site! You got lucky this time with wantedfunnybunny2 answering. Next time, please show us what you've tried. Right now I have nothing to work off of and it seems as if you put zero effort into the problem.

2 comments

0

can you find for me scripting tutorial ?

0

He just wanted a hint of where to go,wanted just happened to answer it fully

Put all of your maps in lighting. This is designed to support 6 maps, but it can be easily edited for more. Name each of your maps M1, M2, M3, M4, M5, and m6

local T = 1 --Change this to how long you want each map to be played on
local M = 1
local L = game.Lighting
local M1 = L.Map1:Clone()
local M2 = L.Map2:Clone()
local M3 = L.Map3:Clone()
local M4 = L.Map4:Clone()
local M5 = L.Map5:Clone()
local M6 = L.Map6:Clone()
local C = nil

while true do
	if M == 1 then
		M = M + 1
		C = M1:Clone()
		C:MakeJoints()
		C.Parent = game.Workspace
		Wait(T)
		C:Remove()
	elseif M == 2 then
		M = M + 1
		C = M2:Clone()
		C:MakeJoints()
		C.Parent = game.Workspace
		Wait(T)
		C:Remove()
	elseif M == 3 then
		M = M + 1
		C = M3:Clone()
		C:MakeJoints()
		C.Parent = game.Workspace
		Wait(T)
		C:Remove()
	elseif M == 4 then
		M = M + 1
		C = M4:Clone()
		C:MakeJoints()
		C.Parent = game.Workspace
		Wait(T)
		C:Remove()
	elseif M == 5 then
		M = M + 1
		C = M5:Clone()
		C:MakeJoints()
		C.Parent = game.Workspace
		Wait(T)
		C:Remove()
	elseif M == 6 then
		M = 1
		C = M6:Clone()
		C:MakeJoints()
		C.Parent = game.Workspace
		Wait(T)
		C:Remove()
	else
	end
end

Teleporter

for i,v in pairs(game.Players:GetPlayers()) do
if v.Character ~= nil then
if v.TeamColor == "Bright red" then 
v.Character.Torso.Position = Vector3.new(0, 0, 0) --Position Team 1 teleports to
elseif v.TeamColor == "Bright green" then 
v.Character.Torso.Position = Vector3.new(0, 0, 0) --Position Team 2 teleports to
end 
end
end
--Change the vector 3 values to the position you wish the players to teleport to.

6 comments

0

Thanks but how do i teleport players to it and get map from Replicated storage

0

Well if you don't want to put your maps in lighting (I recommend doing this for beginners) Just put the maps in Replicated storage and Make the variable L - game.ReplicatedStorage.

0

I haven't tested this it may not work, also I edited my answer to how you teleport them. Using A murder game as an example

0

how do i add wait ?

0

It sounds like you shouldn't be worried on how to make maps switch, but about learning to code. You should learn the basics before beginning to code virtually any game -- things like wait are quickly and easily learned.

0

To add wait just put the wait wherever you want it to wait until the below lines are ran and but int he parentheses how long you wish to wait.

If you wanted random maps couldnt you use math.random and check what the answer is equal to and if it equals a certain number then loads the map?

This discussion is preserved as it was. New answers, comments, and votes are closed.