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

scripting trouble: script where if someone dies then everyone dies?

i learned how to make a script for a brick to kill you... but i’m having trouble to make it where if someone dies then everyone dies and respawns, so how do i do it or how do i start off? any help is appreciated!

2 answers

**Put a local script into StarterGui: **

wait()

local player = game.Players.LocalPlayer
local chr = player.Character
local humanoid = chr:WaitForChild("Humanoid")

humanoid.Died:Connect(function()
	for i,v in pairs(game.Players:GetPlayers()) do
		v.Character:WaitForChild("Humanoid").Health = 0
	end
end)

Hope this helps!

2 comments

0

it sadly didn't work :( i appreciate it though, i'll have to find out some way.

0

Did you put a local script into the starter gui?

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