gerit99
|
  |
| Joined: 21 Jul 2010 |
| Total Posts: 521 |
|
|
| 16 Jan 2013 06:05 AM |
| I need to make a tool, which can detect the part you are currently holding your mouse. I know the mouse.Target thing, but how do you get the player and then check his current mouse when it moves? |
|
|
| Report Abuse |
|
|
gerit99
|
  |
| Joined: 21 Jul 2010 |
| Total Posts: 521 |
|
| |
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 16 Jan 2013 08:49 AM |
Use local script. Also you can just use GetMouse method. Only downside for it is, that you can't change icon.
player = game.Players.LocalPlayer mouse = player:GetMouse()
mouse.Button1Down:connect(function() print("Mouse was clicked.")
down = true
while down do print("Mouse is being held") wait(1) end end)
mouse.Button1Up:connect(function() down = false end)
|
|
|
| Report Abuse |
|
|
gerit99
|
  |
| Joined: 21 Jul 2010 |
| Total Posts: 521 |
|
|
| 16 Jan 2013 09:30 AM |
| I ment- always, also if it is not clicked. |
|
|
| Report Abuse |
|
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 16 Jan 2013 09:48 AM |
Just edit it ._.
You should know at least that much scripting skills, because making tools is not that easy as other stuff. |
|
|
| Report Abuse |
|
|
jelly134
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 1137 |
|
|
| 16 Jan 2013 11:17 AM |
http://wiki.roblox.com/index.php/Move_(Event)
http://wiki.roblox.com/index.php/Target_(Property)/mouse
|
|
|
| Report Abuse |
|
|
gerit99
|
  |
| Joined: 21 Jul 2010 |
| Total Posts: 521 |
|
|
| 16 Jan 2013 11:50 AM |
| Yeah, I've made 2 tools already, and I just haven't used Mouse yet. |
|
|
| Report Abuse |
|
|
gerit99
|
  |
| Joined: 21 Jul 2010 |
| Total Posts: 521 |
|
|
| 16 Jan 2013 12:12 PM |
| And thanks, I can continue my game now. |
|
|
| Report Abuse |
|
|
jelly134
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 1137 |
|
|
| 16 Jan 2013 12:21 PM |
No problem
- Jelly134 Wiki Staff Profile: http://wiki.roblox.com/index.php/User:Jelly134 |
|
|
| Report Abuse |
|
|
gerit99
|
  |
| Joined: 21 Jul 2010 |
| Total Posts: 521 |
|
|
| 16 Jan 2013 12:32 PM |
| Can you also ignore targets while using mouse.Target? |
|
|
| Report Abuse |
|
|
jelly134
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 1137 |
|
|
| 16 Jan 2013 12:45 PM |
What do you mean?
- Jelly134 Wiki Staff Profile: http://wiki.roblox.com/index.php/User:Jelly134 |
|
|
| Report Abuse |
|
|
gerit99
|
  |
| Joined: 21 Jul 2010 |
| Total Posts: 521 |
|
|
| 16 Jan 2013 12:48 PM |
I am currently trying to make it so you can place towers. The camera is rotated to be EXACTLY above the towers. So when you click the fake tower (why I needed moving) it thinks it's not supposed to be there and just doesn't let you buy it. So I wonder, can you ignore the targets a mouse hits, or just do anything to make it work. |
|
|
| Report Abuse |
|
|
Monkey727
|
  |
| Joined: 12 Jan 2009 |
| Total Posts: 969 |
|
|
| 16 Jan 2013 12:50 PM |
| http://wiki.roblox.com/index.php/TargetFilter_(Property) |
|
|
| Report Abuse |
|
|
jelly134
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 1137 |
|
|
| 16 Jan 2013 12:51 PM |
If you want mouse.Target to ignore certain parts or a model's descendants, you can use http://wiki.roblox.com/index.php/TargetFilter_(Property)
- Jelly134 Wiki Staff Profile: http://wiki.roblox.com/index.php/User:Jelly134 |
|
|
| Report Abuse |
|
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 16 Jan 2013 12:51 PM |
Yes, but you can ignore only one model, so you'll have to place all fake towers in one model.
To make mouse ignore stuff, you do this:
mouse.TargetFilter = model |
|
|
| Report Abuse |
|
|
jelly134
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 1137 |
|
|
| 16 Jan 2013 12:52 PM |
Wow, we all posted the same answer pretty much. That is major overlap XD
- Jelly134 Wiki Staff Profile: http://wiki.roblox.com/index.php/User:Jelly134 |
|
|
| Report Abuse |
|
|
Monkey727
|
  |
| Joined: 12 Jan 2009 |
| Total Posts: 969 |
|
| |
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 16 Jan 2013 12:53 PM |
| Yes, forums are quite active starting from about this time. |
|
|
| Report Abuse |
|
|
jelly134
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 1137 |
|
|
| 16 Jan 2013 12:57 PM |
As all the guys from the other time zones come on. It's nice when it's just the British and Europeans on :L I can actually answer things XD
- Jelly134 Wiki Staff Profile: http://wiki.roblox.com/index.php/User:Jelly134 |
|
|
| Report Abuse |
|
|
Monkey727
|
  |
| Joined: 12 Jan 2009 |
| Total Posts: 969 |
|
|
| 16 Jan 2013 01:00 PM |
| Yeah, This is usually the time I stop looking at the forums. |
|
|
| Report Abuse |
|
|
gerit99
|
  |
| Joined: 21 Jul 2010 |
| Total Posts: 521 |
|
|
| 16 Jan 2013 01:13 PM |
| And, probably my last question, can you ignore my game.Workspace.Ignore with MoveTo? |
|
|
| Report Abuse |
|
|
Monkey727
|
  |
| Joined: 12 Jan 2009 |
| Total Posts: 969 |
|
|
| 16 Jan 2013 01:19 PM |
| If you are using the mouse position it will ignore parts inside Ignore, But the MoveTo I doubt it will ignore the parts since it wont allow parts to go inside others so will go ontop of other parts but should have the same X and Z positions. If that makes sense e.e |
|
|
| Report Abuse |
|
|
gerit99
|
  |
| Joined: 21 Jul 2010 |
| Total Posts: 521 |
|
|
| 16 Jan 2013 01:35 PM |
| That's why I asked. Since now I am placing my towers... you know, on-top of the fake ones :P |
|
|
| Report Abuse |
|
|
gerit99
|
  |
| Joined: 21 Jul 2010 |
| Total Posts: 521 |
|
|
| 16 Jan 2013 01:50 PM |
| I just put the fake tower in the Lighting for a wait(), then I just put it in again after the tower is placed. |
|
|
| Report Abuse |
|
|