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: kill script

Previous Thread :: Next Thread 
AkyraTheWolf is not online. AkyraTheWolf
Joined: 08 Jun 2012
Total Posts: 7768
13 Mar 2013 03:54 PM
I wanna do the kill script to kill like lava checkers in obbies.
Report Abuse
UnAdmin is not online. UnAdmin
Joined: 10 Jul 2012
Total Posts: 4706
13 Mar 2013 03:58 PM
In response to this thread I say,

script.Parent.Touched:connect(function(hit)
local human = hit.Parent:findFirstChild("Humanoid")
if human then
human.Health = 0
end
end)


Big head master race.
Report Abuse
velibor is not online. velibor
Joined: 24 Nov 2009
Total Posts: 1003
13 Mar 2013 03:59 PM
1) Create a function called 'Kill with a Parameter called 'Obj''

function Kill(Obj)
end

2) Create a Event that triggers our function

function Kill(Obj)
end

script.Parent.Touched:connect(function(Obj) Kill(Obj) end)

3) Let's write our main function.
We need to check the next :
1) Do we have a Player, is he alive ?

-- This is your job ;-) (I helped you out a lot)

Advice : Check or the Player exist in Game.Players and has a Humanoid in his Character.
Report Abuse
AkyraTheWolf is not online. AkyraTheWolf
Joined: 08 Jun 2012
Total Posts: 7768
13 Mar 2013 03:59 PM
THANKS.
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