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

Map Chooser, help? [Not Solved]

Asked by 11 years ago

I'm trying to make a paintball game for my friend. But the map chooser isn't working.. Neither does the Paintball gun clone. (To backpack) Help?

01MSG = game.Workspace.WGM
02maps = {"Dome","PaintballOriginal"}
03while true do
04    MSG.Text = "Intermission..."
05    wait(15)
06    MSG.Text = "Starting new game..."
07    wait(10)
08    MSG.Text = "Starting up..."
09    wait(5)
10    MSG.Text = "Ready..."
11    wait(3)
12    MSG.Text = "Set..."
13    wait(3)
14    MSG.Text = "Go!"
15    wait(2)
16    MSG.Text[math.random(#maps)]
17    --stuff
18    wait()
19    game.Lighting.LinkedPaintballGun:Clone(backpack)
20end

Thanks!

2 answers

Log in to vote
0
Answered by
hiccup111 231 Moderation Voter
11 years ago

Line 16, you're only giving a string, to load a map you need the actual map:

01MapList = game.ReplicatedStorage.Maps
02GunList = game.ReplicatedStorage.Guns
03 
04while wait() do
05    -- countdown etc
06 
07    chosenMap = MapList:GetChildren()[math.random(#MapList:GetChildren()):Clone()
08    chosenMap.Parent = Workspace
09    chosenMap:MoveTo( Vector3.new(0,0,0) ) -- if you want a specific position
10 
11    for _,v in pairs(GunList:GetChildren()) do
12        if v:IsA("Tool") or v:IsA("HopperBin") then
13 
14            for _,p in pairs(game.Players:GetChildren()) do
15                p.Backpack:ClearAllChildren() -- don't want an overflow of tools.
View all 21 lines...
0
What about the Intermission and the Ready Set Go thing? Just copy this and put it after it? DDDropTheBase 0 — 11y
0
'chosenMap.Parent = Workspace' nil value and, There are gonna be two maps.. And I want it to teleport to the chosen map. DDDropTheBase 0 — 11y
0
Wait I got it! Thanks! DDDropTheBase 0 — 11y
0
Jolly good ^^ hiccup111 231 — 11y
0
Actually, now that I tested it, it doesn't work.. DDDropTheBase 0 — 11y
Ad
Log in to vote
-1
Answered by
KAAK82 16
11 years ago
01Dome = game.Lighting.Dome
02PaintballOriginal = game.Lighting.PaintballOriginal
03maps = {Dome, PaintballOriginal}
04while true do
05MSG = Instance.new(Message) --Put speech marks inside, sry, mine don't work
06MSG.Parent = game.Workspace
07    MSG.Text = "Intermission..."
08    wait(15)
09    MSG.Text = "Starting new game..."
10    wait(10)
11    MSG.Text = "Starting up..."
12    wait(5)
13    MSG.Text = "Ready..."
14    wait(3)
15    MSG.Text = "Set..."
View all 23 lines...

Hope I helped :D

0
It's working so far! Thanks! DDDropTheBase 0 — 11y
0
oh, so u dint need my help? cool... well, wish ya luck next time ;) KAAK82 16 — 11y

Answer this question