Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Hello, again can you help me? if player died then they get be deleted from Players! Why and how?

Hello, again can you help me? if player died then they get be deleted from Players! Why and how?

This is my script:


game.Players.PlayerAdded:Connect(function(Player) Player.CharacterAdded:Connect(function(Character) Character.Humanoid.Died:Connect(function()

		if Player:FindFirstChild("Survivor") then
			Player.Survivor:Destroy()
			local D = Instance.new("BoolValue")
			D.Name = "Dead"
			D.Parent = Player.Character
		elseif Player:FindFirstChild("Killer") then
			Player.Killer:Destroy()
		end
		
		wait(1)

		Player.PlayerGui.Gui.GameFrame.Visible = false
		Player.PlayerGui.Gui.MenuFrame.Visible = true
		Player.CameraMode = Enum.CameraMode.Classic

	end)
end)

end)


1 answer

Ohh, sorry i writed (v:destroy (v = player)) it to gamelogic script xD

This discussion is preserved as it was. New answers, comments, and votes are closed.