generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Lava block

Previous Thread :: Next Thread 
funderpanda is not online. funderpanda
Joined: 26 Feb 2012
Total Posts: 21
14 Apr 2014 04:58 PM
How do you make a block that kills/respawns people if they touch it?
Report Abuse
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
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 is not online. Ace23333
Joined: 20 Nov 2011
Total Posts: 1341
14 Apr 2014 05:00 PM
Go to wiki
Report Abuse
laffydecious is not online. laffydecious
Joined: 26 Nov 2010
Total Posts: 573
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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image