I want there to be a piece to kill me and other players when they touch it.
Put this script into whatever brick that you want it to kill you.
01 | function onTouched(hit) |
02 |
03 | local h = hit.Parent:findFirstChild( "Humanoid" ) |
04 |
05 | if h ~ = nil then |
06 |
07 | h.Health = 0 |
08 |
09 | end |
10 | end |
11 | script.Parent.Touched:connect(onTouched) |