Global Table recall help?
So I have defined a global table (first time using klol) and I want it to use the first option in the table in a path
IE. game.Workspace.Spawns._G.StartingPlaces[1].
error: _G is not a valid member of spawns
01 | _G.StartingPlaces = { "StartingPlaceOne" , "StartingPlaceTwo" , "StartingPlaceThree" } |
02 | print (_G.StartingPlaces [ 1 ] .. "Loaded" ) |
03 | print (_G.StartingPlaces [ 2 ] .. "Loaded" ) |
04 | print (_G.StartingPlaces [ 3 ] .. "Loaded" ) |
06 | for timewait = 5 , 0 , - 1 do |
08 | game.StarterGui.PeopleInGame.Time.Text = timewait |
10 | game.StarterGui.PeopleInGame.Time.Text = "Time" |
11 | s = game.Workspace.Spawns |
12 | p = game.Players:GetChildren() |
14 | if game.Workspace:FindFirstChild(p [ i ] .Name) then |
15 | p [ i ] .Character.Torso.CFrame = s._G.StartingPlaces [ 1 ] .CFrame * CFrame.new(math.random(- 3 , 3 ), 8 ,math.random(- 3 , 3 )) |
17 | script.Parent.NumberOfPeopleInGame.Value = #p |