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: Checking if mouse.hit is there..

Previous Thread :: Next Thread 
oplmn1 is not online. oplmn1
Joined: 25 Nov 2010
Total Posts: 994
24 Feb 2014 09:21 PM
I have this tool, and I only want it to do things if it clicked...

I tried a ton of crap. So I just want a simple answer. One that you know will work.

If you want more info: I have at tool, You click places, Brick gets created on that spot, but, if I click the sky, It breaks the tool.
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
24 Feb 2014 09:24 PM
if not mouse then return end


????


or


-- localscript

player = game.Players.LocalPlayer

player.Selected:connect(function(what)
if what == game.Workspace.Baseplate then
--merp
end
end)
Report Abuse
oplmn1 is not online. oplmn1
Joined: 25 Nov 2010
Total Posts: 994
24 Feb 2014 09:25 PM
Stop fking using return I hate it. It should burn It confuses me, It doesn't make sense to me. Just remove it from everything you give me k? Thanks.
Report Abuse
oplmn1 is not online. oplmn1
Joined: 25 Nov 2010
Total Posts: 994
24 Feb 2014 09:28 PM
And other than that, thanks, but it doesent work.

mouse.Button1Down:connect(function()
if not mouse then
-- Code
end
end)

--These dont work either--
if hit then
if mouse.hit then
if hit.p then
if hit:IsA("BasePart") or hit:IsA("Hat") then
Report Abuse
GuestOfChaos is not online. GuestOfChaos
Joined: 01 Sep 2013
Total Posts: 71
24 Feb 2014 09:38 PM
if mouse.hit ~= nil then
...
Report Abuse
oplmn1 is not online. oplmn1
Joined: 25 Nov 2010
Total Posts: 994
24 Feb 2014 09:39 PM
Tried that
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
24 Feb 2014 09:40 PM
isn't it
mouse.Hit--caps at the start?
Report Abuse
oplmn1 is not online. oplmn1
Joined: 25 Nov 2010
Total Posts: 994
24 Feb 2014 09:41 PM
mabye.. let me try.
Report Abuse
JoshuaKempfert is not online. JoshuaKempfert
Joined: 16 Feb 2013
Total Posts: 2407
24 Feb 2014 09:47 PM
Post the script and I'll look at it.

Also, just because you don't understand return doesn't mean it should burn. The world doesn't revolve around you.
Report Abuse
oplmn1 is not online. oplmn1
Joined: 25 Nov 2010
Total Posts: 994
24 Feb 2014 09:56 PM
Stop hatin on me.

Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
24 Feb 2014 10:16 PM
[ Content Deleted ]
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
24 Feb 2014 10:40 PM
I believe there is a method for checking if the mouse clixked an instance.
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
24 Feb 2014 11:24 PM
Isn't it..... if FindRayOnPart or something?
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