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: Is this script correct?

Previous Thread :: Next Thread 
iValianT is not online. iValianT
Joined: 21 Aug 2010
Total Posts: 58381
26 Dec 2013 04:06 PM
I want the mouse position to be printed into the output when the mouse is clicked.

Also, can someone explain "BasePart" to me? What is it?

mouse = game.Players.LocalPlayer:GetMouse()
mouse.ButtonDown:connect(function()
if mouse.Target and mouse.Target:IsA('BasePart') then
wait(1)
print(mouse.X, mouse.Y)
end
end)
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
26 Dec 2013 04:09 PM
I think it's this or like yours, but you've just got wrong connection line then.

mouse = game.Players.LocalPlayer:GetMouse()

mouse.MouseButton1Down:connect(function(m)
if mouse.Target and mouse.Target:IsA('BasePart') then
print(m.X, m.Y)
end
end)
Report Abuse
iValianT is not online. iValianT
Joined: 21 Aug 2010
Total Posts: 58381
26 Dec 2013 04:11 PM
You mean?

mouse.Button1Down?
Report Abuse
iValianT is not online. iValianT
Joined: 21 Aug 2010
Total Posts: 58381
26 Dec 2013 04:13 PM
Also, what is BasePart?

Is it any part in the Workspace?
Report Abuse
iValianT is not online. iValianT
Joined: 21 Aug 2010
Total Posts: 58381
26 Dec 2013 04:24 PM
Bump.
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
26 Dec 2013 04:24 PM
Yeah, I believe yes.
It's a Wedge, Truss, Part and so on...
Report Abuse
iValianT is not online. iValianT
Joined: 21 Aug 2010
Total Posts: 58381
26 Dec 2013 04:25 PM
The how would I make it print the position of the mouse when I click on a certain brick?
Report Abuse
iValianT is not online. iValianT
Joined: 21 Aug 2010
Total Posts: 58381
26 Dec 2013 04:26 PM
To clarify, just a certain brick in the workspace, not any other brick.
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
26 Dec 2013 04:26 PM
mouse.Target.p?
Report Abuse
iValianT is not online. iValianT
Joined: 21 Aug 2010
Total Posts: 58381
26 Dec 2013 04:28 PM
and p will be the name of the part?
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
26 Dec 2013 04:29 PM
No.

p = Position
Report Abuse
iValianT is not online. iValianT
Joined: 21 Aug 2010
Total Posts: 58381
26 Dec 2013 04:31 PM
I'm talking about the mouse target being only a certain brick in the workspace.
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
26 Dec 2013 04:34 PM
Are you using hopperbin?
Report Abuse
iValianT is not online. iValianT
Joined: 21 Aug 2010
Total Posts: 58381
26 Dec 2013 04:35 PM
I have no idea what that is. >.>
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
26 Dec 2013 04:37 PM
A tool that works without a handle.. xD
Report Abuse
iValianT is not online. iValianT
Joined: 21 Aug 2010
Total Posts: 58381
26 Dec 2013 04:38 PM
That is what I need in order to do this?
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
26 Dec 2013 04:42 PM
http://www.roblox.com/Print-Position-Hopperbin-item?id=139951989
Report Abuse
iValianT is not online. iValianT
Joined: 21 Aug 2010
Total Posts: 58381
26 Dec 2013 04:46 PM
Thank you. Now, I'm having Studio issues. -.-
Report Abuse
iValianT is not online. iValianT
Joined: 21 Aug 2010
Total Posts: 58381
26 Dec 2013 05:30 PM
um

i got it to work with out hopperbin

wat
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
26 Dec 2013 05:31 PM
Idk how to do it without it. x)
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