yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
|
| 13 Apr 2015 06:09 AM |
How can i get this part to move with the mouse on like a 0.2 stud incrememnts, currently its quite jumpy
mouse.Move:connect(function() if s == true then local mh = mouse.Hit if mouse.Target ~= selector then selector.CFrame = CFrame.new(mh.p) end end |
|
|
| Report Abuse |
|
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
| |
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
| |
|
error9999
|
  |
| Joined: 05 Sep 2009 |
| Total Posts: 1593 |
|
|
| 13 Apr 2015 06:48 AM |
| you could use 'BodyPosition' I guess, that will make the part fly to the mouse position, it won't jump anymore c: |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
| |
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
|
| 13 Apr 2015 06:50 AM |
| @Above, where do i put that elunate? |
|
|
| Report Abuse |
|
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
| |
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
| |
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
| |
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
| |
|
|
| 13 Apr 2015 07:36 AM |
mouse.Move:connect(function() if s == true then local mh = mouse.Hit if mouse.Target ~= selector then selector.CFrame = CFrame.new(math.floor(mh.p.x*5)*0.2, math.floor(mh.p.y*5)*0.2, math.floor(mh.p.z*5)*0.2) end end
|
|
|
| Report Abuse |
|
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
| |
|
|
| 13 Apr 2015 11:10 AM |
I think you have to make it ignore that part, perhaps with raycasting.
The problem might be that your mouse's target is always the "selector" part, unless you move your mouse off the part. But when you do so, the selector will move farther than you want it to when your mouse moves. |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 13 Apr 2015 11:14 AM |
http://wiki.roblox.com/index.php?title=API:Class/Mouse/TargetFilter
mouse.TargetFilter = part
I script -~ chimmihc |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2015 11:16 AM |
ye or that, no need for raycasting then xD thx |
|
|
| Report Abuse |
|
|