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
 

Help with events

Previous Thread :: Next Thread 
Greyhound40 is not online. Greyhound40
Joined: 15 Oct 2008
Total Posts: 933
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
Greyhound40 is not online. Greyhound40
Joined: 15 Oct 2008
Total Posts: 933
17 Mar 2013 09:33 AM
But Idk how to do it.
Report Abuse
Malephus is not online. 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 is not online. 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
Greyhound40 is not online. Greyhound40
Joined: 15 Oct 2008
Total Posts: 933
17 Mar 2013 09:39 AM
What is the parent of "mouse"
Report Abuse
Greyhound40 is not online. Greyhound40
Joined: 15 Oct 2008
Total Posts: 933
17 Mar 2013 09:39 AM
Nevermind.
Report Abuse
Dr01d3k4 is not online. 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
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