|
| 01 Nov 2011 10:00 PM |
| Can you just type "if mouse then" to verify if the mouse is active, or does that not always return a correct result? |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2011 10:01 PM |
Obviously I'm referring to if you're using the mouse variable in the Selected event.
script.Parent.Selected:connect(function(mouse) if mouse then print("All is well."); end end); |
|
|
| Report Abuse |
|
|
Serbin
|
  |
| Joined: 14 Oct 2011 |
| Total Posts: 40 |
|
|
| 01 Nov 2011 10:04 PM |
script.Parent.MouseClick:connect(function() print("All is well."); end);
? |
|
|
| Report Abuse |
|
|
Serbin
|
  |
| Joined: 14 Oct 2011 |
| Total Posts: 40 |
|
|
| 01 Nov 2011 10:04 PM |
script.Parent.MouseClick:connect(function() print("All is well."); end)
Why did you have a semicolon at the end? |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2011 11:11 PM |
| Cuz he doesn't know C# or C++ or C... |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2011 11:12 PM |
| King don't forget Javascript. |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2011 11:16 PM |
| Ehh... I havn't used Javascript so I don't know what it's like. |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2011 11:19 PM |
Iv been learning Javascript.
< script type="text/javascript" > var tuna = "I am a fish" ; var bacon = "baconator" ; var hame = "hamburgrlator" ; document . write (tuna+bacon+hame) </script> |
|
|
| Report Abuse |
|
|
|
| 02 Nov 2011 12:23 AM |
=_=
Blobbyblob is a much better scripter than the two of you combined.
Anyways, I don't see any reason why that wouldn't work :l
"I WILL GIVE YOU BACON." - Deadmau5 ~Scarfacial |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 02 Nov 2011 10:59 AM |
(I know im bumping this...)
But bikerking200 you could just use < script > You dont need to define that,that it is javascript.... |
|
|
| Report Abuse |
|
|
|
| 02 Nov 2011 01:54 PM |
Lua allows you to use semicolons at the end of commands, guys. Might be nice to know, seeing as you can occasionally get an error if you don't use them.
Anyway, after wasting a whole 5 minutes, I found out:
No, it does not. If you want to check if the mouse is still active, you have to do an ugly hack.
if pcall(function() local x=mouse.Target; end) then print("Mouse exists"); else print("Mouse is no longer active."); end
|
|
|
| Report Abuse |
|
|
|
| 02 Nov 2011 02:35 PM |
| @sue8, Oh never thought oh that. |
|
|
| Report Abuse |
|
|
|
| 01 May 2012 09:27 PM |
Does blobbyblob's method still work?
I've run across this problem myself, but it would seem blobbyblob's method doesn't work right now (or I'm doing something wrong). |
|
|
| Report Abuse |
|
|