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
|
  |
| 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
|
  |
| Joined: 23 Oct 2011 |
| Total Posts: 2063 |
|
| |
|
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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 05 Dec 2009 |
| Total Posts: 1529 |
|
|
| 26 Apr 2012 11:14 PM |
end) end end)
Should be,
end end) end) |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 05 Dec 2009 |
| Total Posts: 1529 |
|
|
| 26 Apr 2012 11:16 PM |
| It should, why don't you test it? |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|
| |
|
|
| 26 Apr 2012 11:20 PM |
| By the way Its Button1Down or ButtonDown, I don't remember. |
|
|
| Report Abuse |
|
|
nopepng
|
  |
| Joined: 23 Oct 2011 |
| Total Posts: 2063 |
|
|
| 26 Apr 2012 11:21 PM |
| No, it's MouseButton1Down. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 26 Apr 2012 11:33 PM |
Yes MouseButton1Down is GUI and Button1Down is Hopper bin,Theres another one for Tool
|
|
|
| Report Abuse |
|
|
nopepng
|
  |
| Joined: 23 Oct 2011 |
| Total Posts: 2063 |
|
|
| 26 Apr 2012 11:34 PM |
Tools use Activated, which is easy enough...
|
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|