Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 3 years ago
Edited 3 years ago

im just wondering, and a bit confused.

1 answer

Log in to vote
0
Answered by 3 years ago

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)

Ad

Answer this question