|
| 14 Apr 2014 04:58 PM |
| How do you make a block that kills/respawns people if they touch it? |
|
|
| Report Abuse |
|
|
|
| 14 Apr 2014 04:59 PM |
--put script in block
script.Parent.Touched:connect(function(hit) local hum = hit.Parent:findFirstChild('Humanoid') if hum ~= nil then local player = game:GetService('Players'):GetPlayerFromCharacter(hum.Parent) if player ~= nil then player:LoadCharacter() end end end)
#nerdsunited |
|
|
| Report Abuse |
|
|
Ace23333
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 1341 |
|
| |
|
|
| 14 Apr 2014 05:06 PM |
--This kills your player (put this in your brick)
function killBrick(part) local humanoid = part.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil) then humanoid.Health = 0 end end script.Parent.Touched:connect(killBrick)
|
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 14 Apr 2014 05:09 PM |
Bet I can make a shorter one!
script.Parent.Touched:connect(function(hit) pcall(function() hit.Parent.Humanoid:TakeDamage(math.huge) end) end) |
|
|
| Report Abuse |
|
|