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
 

Hopper bin killing thingy not working D:

Previous Thread :: Next Thread 
KiwiMeister is not online. KiwiMeister
Joined: 18 Feb 2010
Total Posts: 1464
21 Dec 2013 02:10 AM
bin = script.Parent
backpack = bin.Parent
player = backpack.Parent
while not player.Character do wait() end--not sure what this is for
character = player.Character


bin.Selected:connect(function(mouse)
mouse.Button1Down:connect(function()
local target = mouse.Target
if target:IsA("Model") and target:FindFirstChild("Humanoid") ~= nil then
target.Humanoid.Health = 0
end
end)
end)
Report Abuse
KiwiMeister is not online. KiwiMeister
Joined: 18 Feb 2010
Total Posts: 1464
21 Dec 2013 02:34 AM
Bump
Report Abuse
shotgreen999 is not online. shotgreen999
Joined: 29 Nov 2009
Total Posts: 376
21 Dec 2013 03:04 AM
Here is a working version:
script.Parent.Selected:connect(function(mouse)
mouse.Button1Down:connect(function()
if(mouse.Target) and (mouse.Target.Parent:FindFirstChild("Humanoid")) then
mouse.Target.Parent.Humanoid.Health = 0
end
end)
end)

You forgot to go to the parent.
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