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

I don't know how to specify all players in workspace. Help?

local Died = script.Died game.Players.PlayerAdded:Connect(function(p) p.CharacterAdded:Connect(function() p.Character.Head.Died:Destroy() local Clone = Died:Clone() Clone.Parent = p.Character.Head end) end)

2 comments

0

Do you want this sound to occur anytime a player dies?

0

yes

1 answer

local Flange = script.Flange

game.Players.PlayerAdded:Connect(function(p)
	p.CharacterAdded:Connect(function()
		local Clone = Flange:Clone()
		Clone.Parent = p.Character.Head:FindFirstChild("Died")
	end)
end)

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