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

hey, i was just wondering, how do i insert a script that makes you die when you touch a part?

im just wondering, and a bit confused.

1 answer

Here Is A Script I Just Made And Tested:

local KillPart = game.Workspace.Brick -- The Kill Brick

KillPart.Touched:Connect(function(Touched) 
	
	local FindHumanoid = Touched.Parent:FindFirstChild('Humanoid') -- // Finding The Humanoid
	
	if FindHumanoid then -- If The Humanoid Is Found Then The Player Will Die
		FindHumanoid.Health = 0
	end
end)

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