Players not being inserted into table? Anyone got any ideas why this isn't working?
So I'm going to explain with comments in my script..
I wrote a Server Script
but a part of it doesn't seem to be working
01 | local roundRunning = false |
02 | local Intermission = true |
04 | local seatOne = game.Workspace.Chair 1. Seat |
05 | local seatTwo = game.Workspace.Chair 2. Seat |
06 | local seatThree = game.Workspace.Chair 3. Seat |
07 | local seatFour = game.Workspace.Chair 4. Seat |
08 | local seatFive = game.Workspace.Chair 5. Seat |
09 | local chairSix = game.Workspace.Chair 6. Seat |
11 | if Intermission = = true then |
12 | local intermissionHint = Instance.new( "Hint" , workspace) |
14 | intermissionHint.Text = "Intermission: " ..i |
18 | intermissionHint:Destroy() |
25 | if roundRunning = = true then |
26 | for i,v in pairs (game.Players:GetPlayers()) do |
27 | v.Character.HumanoidRootPart.CFrame = CFrame.new( 25.61 , 7.989 , 11.08 ) |
29 | local playersInCurrentGame = { } |
30 | local playersSeated = { } |
32 | if seatOne:FindFirstChild( "SeatWeld" ) then |
33 | RootPartOfPlayer = seatOne.SeatWeld.Part 1 |
34 | playerInThisSeat = game.Players:GetPlayerFromCharacter(seatOne.SeatWeld.Part 1 ) |
35 | table.insert(playersSeated, playerInThisSeat) |
36 | for i,v in pairs (playersSeated) do |
37 | print (playersSeated [ i ] .Name) |