|
| 17 Mar 2013 09:32 AM |
So, I want to get a hopper bin that:
I need a thing so when I hover my mouse over a part it prints the name and material of the part.
|
|
|
| Report Abuse |
|
|
| |
|
Malephus
|
  |
| Joined: 27 Sep 2009 |
| Total Posts: 6 |
|
|
| 17 Mar 2013 09:34 AM |
I think you would use
mouse.Target
and then use that as if it were just a part. |
|
|
| Report Abuse |
|
|
HD188753
|
  |
| Joined: 13 Jun 2012 |
| Total Posts: 5021 |
|
|
| 17 Mar 2013 09:37 AM |
Heres some old thing I made, prints part name, but not material, figure that part out yourself.
script.Parent.Selected:connect(function(mouse) while true do -- Constantly checks wait(1) -- So it doesn't spam out output target = mouse.Target -- Needs to be updated if target:IsA("BasePart") then -- Check if its an actual object print("Target is " .. target.Name) -- Print it out end end end) |
|
|
| Report Abuse |
|
|
|
| 17 Mar 2013 09:39 AM |
| What is the parent of "mouse" |
|
|
| Report Abuse |
|
|
| |
|
Dr01d3k4
|
  |
| Joined: 11 Oct 2007 |
| Total Posts: 17916 |
|
|
| 17 Mar 2013 09:41 AM |
There are the events mouse.Move and mouse.Idle. you can get what the mouse is over using mouse.Target:
mouse.Idle:connect(function () if (not mouse.Target) then return; end if (mouse.Target.Name == "Hover over me!") then print("Hovering over special brick"); end end); |
|
|
| Report Abuse |
|
|