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

How do I make a brick kill a player?

Asked by 10 years ago

I'm new to scripting, I want to make a brick kill the player that clicked it, right when they click it, and still work after that. Please help me. :C

2 answers

Log in to vote
2
Answered by
Vividex 162
10 years ago

More information Here

local part = script.Parent
part.Touched:connect(function(hit)
    if hit.Parent then --common pitfall of kill bricks, without this the script will break when hit by bullets
        local hum = hit.Parent:FindFirstChild("Humanoid")
        if hum then
            hum.Health = 0
        end
    end
end)
Ad
Log in to vote
-3
Answered by 10 years ago

Delete this question its not allowed, your not allowed to ask for scripts.

Answer this question