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: Hover Over Brick with mouse

Previous Thread :: Next Thread 
rastamann is not online. rastamann
Joined: 27 May 2008
Total Posts: 539
02 Jan 2012 04:29 PM
My Question is, how i can get a bricks parameters or something in it by hovering over with mouse, whats the command ?
Report Abuse
N0N3x3X15T3NT is not online. N0N3x3X15T3NT
Joined: 28 Feb 2011
Total Posts: 80
02 Jan 2012 04:32 PM
Well, you'd find the brick the mouse is pointing at, then use magnitude to find the distance between the brick and the player, then write the magnitude.
Report Abuse
rastamann is not online. rastamann
Joined: 27 May 2008
Total Posts: 539
02 Jan 2012 04:35 PM
And whats the command for the pointing ?
Report Abuse
rastamann is not online. rastamann
Joined: 27 May 2008
Total Posts: 539
02 Jan 2012 04:35 PM
Or better, could you give me an exemple so i can understand it better !
Report Abuse
N0N3x3X15T3NT is not online. N0N3x3X15T3NT
Joined: 28 Feb 2011
Total Posts: 80
02 Jan 2012 04:37 PM
Well, you gotta get to the mouse first... But once you're there it's Mouse.Hit
Report Abuse
rastamann is not online. rastamann
Joined: 27 May 2008
Total Posts: 539
02 Jan 2012 04:42 PM
i dont understand it sry. couldn't you give me an exemple ? Let's say, in that brick is a Valuable. And if i point on it, the script should print the valuable. Got it ?
Report Abuse
Ravenshield is not online. Ravenshield
Joined: 21 Nov 2007
Total Posts: 4143
02 Jan 2012 04:44 PM
To be able to use Mouse.Hit, you need to use a Hopperbin, or the Equipped event of Tools.

Anywhere in the script (localscript, preferably, to work correctly in Online) of the tool, you may refer to "Mouse". Then you can do:

local target = Mouse.Hit
local tarPos = target.Position
local dist = (player.Character.Torso.Position.magnitude - target.Position.magnitude)

Well, you get the point.
Report Abuse
N0N3x3X15T3NT is not online. N0N3x3X15T3NT
Joined: 28 Feb 2011
Total Posts: 80
02 Jan 2012 04:44 PM
I can try... This isn't tested or anything and will most likely be aweful but I'll try

local function test(m)
while true do
local mag = (m.Hit - script.Parent.Parent.Parent.Character).magnitude
h = game.Workspace.Hint.Text
h= (mag)
end
tool.Equipped:connect(onEquipped)

I might have messed up, wouldn't be surprised if I did... I'm not sure that mag should be in parenthasees but the rest should work. I think...
Report Abuse
N0N3x3X15T3NT is not online. N0N3x3X15T3NT
Joined: 28 Feb 2011
Total Posts: 80
02 Jan 2012 04:45 PM
Yea, forgot to add that part...
Report Abuse
rastamann is not online. rastamann
Joined: 27 May 2008
Total Posts: 539
02 Jan 2012 04:49 PM
@Ravenshield

Why do i need the magnitude ?
Report Abuse
Ravenshield is not online. Ravenshield
Joined: 21 Nov 2007
Total Posts: 4143
02 Jan 2012 04:53 PM
You wanted to find the distance between the player and the brick?

And also, I'm not sure if I used magnitude right. I'm not too experienced with it. ;)
Report Abuse
rastamann is not online. rastamann
Joined: 27 May 2008
Total Posts: 539
02 Jan 2012 04:56 PM
Nooo i want the parameters. Like Name or ClassName or something like that. Or that i can get a Value thats in that brick you understand ? And could you please give me an exemple i wana learn it, but like that its too difficult. And Sry for my english im swiss xD
Report Abuse
Raven5887 is not online. Raven5887
Joined: 08 Dec 2008
Total Posts: 3184
02 Jan 2012 04:58 PM
Did any of you ever heard of the mouse.Move event? -,-
Report Abuse
rastamann is not online. rastamann
Joined: 27 May 2008
Total Posts: 539
02 Jan 2012 04:59 PM
nooo so please explain it too me or give me an exemple that would be great :D
Report Abuse
Ravenshield is not online. Ravenshield
Joined: 21 Nov 2007
Total Posts: 4143
02 Jan 2012 05:00 PM
Obviously, Raven.. I just wasn't thinking about it being hovering over - not clicking. My bad..
Report Abuse
rastamann is not online. rastamann
Joined: 27 May 2008
Total Posts: 539
02 Jan 2012 05:18 PM
bump
Report Abuse
rastamann is not online. rastamann
Joined: 27 May 2008
Total Posts: 539
02 Jan 2012 06:12 PM
Heelp meee
Report Abuse
rastamann is not online. rastamann
Joined: 27 May 2008
Total Posts: 539
03 Jan 2012 05:53 AM
No one ?
Report Abuse
Robain is not online. Robain
Joined: 10 Oct 2008
Total Posts: 349
03 Jan 2012 07:35 AM
mouse.Hit or mouse.Target or something? It was something like that.

~~http://www.roblox.com/Forum/ShowPost.aspx?PostID=57823962~~
~~Another post for me. Umadbro?~~
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