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 script a map changer ?

This is what i have did

local maps = game.ReplicatedStorage
local Weapon = game.Lighting
while true do

repeat
wait(10)
lobbymsg = Instance.new ("Message")
lobbymsg.text = ("3 Players or more is required to play this game")
lobbymsg.Parent = Workspace
lobbymsg:remove()
until game.Player:GetPlayers()
if players > 2 
	then gamemsg = Instance.new ("Message")
	gamemsg = ("Choosing Maps")
	Maps =#(math.random(1,2)

what do i do next ? `

1 comment

0

You should try looking for a Free Model minigames script and decrypting it to figure out how it works. This code is very... bad is the best way to I can describe it.

2 answers

Call the maps in ReplicatedStorage like Map1 Map2 Map3.... Then do this:

while true do
wait()
local Weapon = game.Lighting
local MapAmount = 2 -- Change to how many maps you got
repeat
wait(1)
lobbymsg = Instance.new ("Message")
lobbymsg.Text = ("3 Players or more is required to play this game")
lobbymsg.Parent = game.Workspace
lobbymsg:Remove()
until #game.Players:GetChildren() >= 3
    gamemsg = Instance.new ("Message")
    gamemsg.Text = ("Choosing Maps")
    Map = game.ReplicatedStorage:FindFirstChild("Map"..(math.random(1, MapAmount))):Clone()
    Map.Parent = game.Workspace
    wait(60) -- Change to how long one map lasts
    Map:Remove()
end

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