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 » Scripters
Home Search
 

Re: Did I do this correctly?

Previous Thread :: Next Thread 
yourself is not online. yourself
Joined: 24 Jul 2006
Total Posts: 3013
20 Jun 2016 04:23 PM
Script is to destroy on touch.

-------------------------------

bin = script.Parent

function onTouched(Part2)
local h = Part2.Parent:FindFirstChild("Humanoid")
if h then
while h.Health > 0 do
h.Health = h.Health - 100
wait(1)
end
end
end

bin.Touched:connect(onTouched)


Classic-Plastic ( ͡° ͜ʖ ͡°)
Report Abuse
yourself is not online. yourself
Joined: 24 Jul 2006
Total Posts: 3013
20 Jun 2016 04:25 PM
Bump


Classic-Plastic ( ͡° ͜ʖ ͡°)
Report Abuse
OnlySinister is not online. OnlySinister
Joined: 07 Jan 2015
Total Posts: 885
20 Jun 2016 04:27 PM
That script seems to kill rather than destroy
Report Abuse
yourself is not online. yourself
Joined: 24 Jul 2006
Total Posts: 3013
20 Jun 2016 04:28 PM
Thanks.


Classic-Plastic ( ͡° ͜ʖ ͡°)
Report Abuse
OnlySinister is not online. OnlySinister
Joined: 07 Jan 2015
Total Posts: 885
20 Jun 2016 04:29 PM
script.Parent.Touched:connect(function(h)
if h and h.Parent and h.Parent:FindFirstChild('Humanoid') then
h.Parent:FindFirstChild('Humanoid').Health = 0
end
end

Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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