still onto this meteor game that i made, Which i ask very much about how to fix some script issues. Im not that good at tables as u realised just now when looking at the script. Heres the script :

while true do
	for i,v in pairs(_G.Survivors) do
		v.Character.Humanoid.Died:Connect(function()
			table.remove(_G.Survivors,i)
		end)
		
	end
	wait()
end

2 comments

0

Iterate through tables using ipairs. I would also suggest that you try to check if the table even has anything inside it. The use of _G isn't really a safe practice

0

_G is safe with filtering enabled but I don't recommend the use of it since its global for that scope (ex: it can be seen from any server script) make sure you insert some prints to debug it. Make sure that it even notices the humanoid died.