if #game.Players:GetChildren() == 1 then for i,v in pairs(game.Players:GetChildren()) do v.Character:MoveTo(game.Workspace.spawns:findFirstChild(i).Position) table.insert(alive,#alive+1,v) _G.game = true game.Workspace.Lighting.FingerLazers:clone().Parent = v.Backpack if v.Character.Humanoid.Health > 0 then track_death(v) else died(v) end end repeat wait(1) until done done = false else message = Instance.new("Message", game.Workspace) message.Text = "Too many players have left! Waiting for more to start the game..." wait(3) message:Destroy() end end end
When-ever I put
game.Workspace.Lighting.FingerLazers:clone().Parent = v.Backpack
In the script, it doesn't give me the Finger Lazers like I want it to from lightning, and the game doesn't end.
When I remove that 1 line, everything works fine but I need the Finger Lazers ;/
I'm pretty sure Lighting isn't in Workspace.
Maybe you could try a quick local instead of doing it directly. For example:
local g = game.Lighting.FingerLasers:Clone() g.Parent = v.Backpack -- Note, backpack has only one capital letter, this gets me a lot.
Table.insert must one use two arguments. You've put in 3. You could perhaps do:
table.insert(alive,{#alive+1,v})
And, where is track_death and all the other functions from, please tell me and what is in the function. Thanks! :)