human
How do I make a death script on Roblox?
assistant
Script on Roblox
1. Open Roblox Studio.
2. Insert a new block and name it "Deathblock".
3. Right-click the deathblock and click Insert Object.
4. Insert a new script.
5. Write "function onTouch(Deathblock)" on the first line.
6. Write "local humanoid = Deathblock.Parent:FindFirstChild("Humanoid")" on the next line.
7. Write "if (humanoid ~= nil) then" on the next line.
8. Write "humanoid.Health = 0" on the next line.  
9. Write "end"  on the next line.
10. Write "end" again on the next line.
11. Write "script.Parent.Touched:connect(onTouch)" on the last line.