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?
01 | MSG = game.Workspace.WGM |
02 | maps = { "Dome" , "PaintballOriginal" } |
03 | while 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) |
20 | end |
Thanks!
Line 16, you're only giving a string, to load a map you need the actual map:
01 | MapList = game.ReplicatedStorage.Maps |
02 | GunList = game.ReplicatedStorage.Guns |
03 |
04 | while wait() do |
05 | -- countdown etc |
06 |
07 | chosenMap = MapList:GetChildren() [ math.random(#MapList:GetChildren()):Clone() |
08 | chosenMap.Parent = Workspace |
09 | chosenMap:MoveTo( Vector 3. 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. |
01 | Dome = game.Lighting.Dome |
02 | PaintballOriginal = game.Lighting.PaintballOriginal |
03 | maps = { Dome, PaintballOriginal } |
04 | while true do |
05 | MSG = Instance.new(Message) --Put speech marks inside, sry, mine don't work |
06 | MSG.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..." |
Hope I helped :D