Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

How do i make Map Changer ?

Asked by 10 years ago

Help Please I'm new at this

3 answers

Log in to vote
2
Answered by 10 years ago

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.

0
can you find for me scripting tutorial ? decade111 5 — 10y
0
He just wanted a hint of where to go,wanted just happened to answer it fully raspyjessie 117 — 10y
Ad
Log in to vote
1
Answered by 10 years ago

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.
0
Thanks but how do i teleport players to it and get map from Replicated storage decade111 5 — 10y
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. wantedfunnybunny2 20 — 10y
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 wantedfunnybunny2 20 — 10y
0
how do i add wait ? decade111 5 — 10y
View all comments (2 more)
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. RoboFrog 400 — 10y
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. wantedfunnybunny2 20 — 10y
Log in to vote
0
Answered by 10 years ago

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?

Answer this question