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: Hopperbin Target?

Previous Thread :: Next Thread 
iPremiumZ is not online. iPremiumZ
Joined: 23 Jan 2012
Total Posts: 6834
26 Apr 2012 10:48 PM
How would you, for instance, check if the target while a Hopperbin is equipped is a part?
Report Abuse
nopepng is not online. nopepng
Joined: 23 Oct 2011
Total Posts: 2063
26 Apr 2012 10:49 PM
script.Parent.Selected:connect(function(mouse)
if mouse.Hit:IsA("Part") then
--derp
end
end)

i think
Report Abuse
nopepng is not online. nopepng
Joined: 23 Oct 2011
Total Posts: 2063
26 Apr 2012 10:50 PM
change Hit to Target pls
Report Abuse
iPremiumZ is not online. iPremiumZ
Joined: 23 Jan 2012
Total Posts: 6834
26 Apr 2012 10:54 PM
So, I could do this:


script.Parent.Selected:connect(function(mouse)
if mouse.Target:IsA("Part") then
mouse.Target:Destroy()
end
end)
Report Abuse
nopepng is not online. nopepng
Joined: 23 Oct 2011
Total Posts: 2063
26 Apr 2012 10:56 PM
That would destroy any Part that the mouse scrolls over....

EPIC DELETE TOOL

Report Abuse
iPremiumZ is not online. iPremiumZ
Joined: 23 Jan 2012
Total Posts: 6834
26 Apr 2012 11:12 PM
script.Parent.Selected:connect(function(mouse)
script.Parent.MouseButton1Down:connect(function(click)
if mouse.Target:IsA("Part") then
mouse.Target:Destroy()
end)
end
end)

would this work?
Report Abuse
l0lzz is not online. l0lzz
Joined: 05 Dec 2009
Total Posts: 1529
26 Apr 2012 11:14 PM
end)
end
end)

Should be,


end
end)
end)
Report Abuse
nopepng is not online. nopepng
Joined: 23 Oct 2011
Total Posts: 2063
26 Apr 2012 11:14 PM
script.Parent.Selected:connect(function(mouse)
mouse.MouseButton1Down:connect(function()
if mouse.Target:IsA("Part") then
mouse.Target:Destroy()
end
end)
end)
Report Abuse
iPremiumZ is not online. iPremiumZ
Joined: 23 Jan 2012
Total Posts: 6834
26 Apr 2012 11:15 PM
script.Parent.Selected:connect(function(mouse)
script.Parent.MouseButton1Down:connect(function(click)
if mouse.Target:IsA("Part") and mouse.Target.Name == "SpeshulRock" then
mouse.Target:Destroy()
end
end)
end)

Doez dis work?
Report Abuse
nopepng is not online. nopepng
Joined: 23 Oct 2011
Total Posts: 2063
26 Apr 2012 11:16 PM
No, it should be
mouse.MouseButton1Down:connect(function()

derp
Report Abuse
l0lzz is not online. l0lzz
Joined: 05 Dec 2009
Total Posts: 1529
26 Apr 2012 11:16 PM
It should, why don't you test it?
Report Abuse
iPremiumZ is not online. iPremiumZ
Joined: 23 Jan 2012
Total Posts: 6834
26 Apr 2012 11:17 PM
@ l0l, on my mac, no robloxstudio, can't download it.
Report Abuse
nopepng is not online. nopepng
Joined: 23 Oct 2011
Total Posts: 2063
26 Apr 2012 11:17 PM
use my advice,

you're messing up with the MouseButton1Down
Report Abuse
nopepng is not online. nopepng
Joined: 23 Oct 2011
Total Posts: 2063
26 Apr 2012 11:18 PM
@iPremium,

I'm on my mac and I have studio...
Report Abuse
l0lzz is not online. l0lzz
Joined: 05 Dec 2009
Total Posts: 1529
26 Apr 2012 11:18 PM
Oh, ok, and use nopepng's advice, I missed the MouseButton1Down.
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
26 Apr 2012 11:19 PM
Same.
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
26 Apr 2012 11:20 PM
By the way Its Button1Down or ButtonDown, I don't remember.
Report Abuse
nopepng is not online. nopepng
Joined: 23 Oct 2011
Total Posts: 2063
26 Apr 2012 11:21 PM
No, it's MouseButton1Down.
Report Abuse
nopepng is not online. nopepng
Joined: 23 Oct 2011
Total Posts: 2063
26 Apr 2012 11:31 PM
Wait, it IS Button1Down, MouseButton1Down is for GUIs, so I've been told.

Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
26 Apr 2012 11:33 PM
Yes MouseButton1Down is GUI and Button1Down is Hopper bin,Theres another one for Tool

Report Abuse
nopepng is not online. nopepng
Joined: 23 Oct 2011
Total Posts: 2063
26 Apr 2012 11:34 PM
Tools use Activated, which is easy enough...

Report Abuse
grimm343 is not online. grimm343
Joined: 18 Sep 2008
Total Posts: 2796
26 Apr 2012 11:35 PM
*Nods*
Big things are happening, in this sub-forum; big things!

Also, you should check if the Target is a BasePart, rather than just a Part. A BasePart can be a Part, CornerWedgePart, FormFactorPart, ParallelRampPart, PrismPart, PyramidPart, RightAngleRampPart, SkateboardPlatform, SpawnLocation, TrussPart, or VehicleSeat.

Also, a few of those mentioned contain other things. For example, a WedgePart is a FormFactorPart.
Report Abuse
nopepng is not online. nopepng
Joined: 23 Oct 2011
Total Posts: 2063
26 Apr 2012 11:37 PM
@grimm,

OH that's what a BasePart is,

I never understood it from the wiki,

I thought it was just another name for a part...
Report Abuse
grimm343 is not online. grimm343
Joined: 18 Sep 2008
Total Posts: 2796
26 Apr 2012 11:37 PM
@tehepic,
Button1Down is an event of the Mouse object, so it will work in a Tool, too.
Report Abuse
nopepng is not online. nopepng
Joined: 23 Oct 2011
Total Posts: 2063
26 Apr 2012 11:38 PM
Ohh after reading the BasePart page ( I think i was reading the wrong thing originally) it says I can make prism parts.

YAY
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