In this video I will show how to make a kill brick where basically when a player steps on a brick their character will die.
Code:
scipt.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid")
hit.Parent.Humanoid.Health = 0
end
end)
meaning
When the scripts parent is touched which is the kill brick we want to connect a function then we want to check if the thing that's stepping on the brick has a humanoid in it, if it does then we want the player who hit the brick's health to become 0 aka die.