BleuRBX
|
  |
| Joined: 24 Nov 2011 |
| Total Posts: 146 |
|
|
| 08 Jan 2016 08:36 PM |
So I have this script where I am able to drag a brick that is limited to only the X axis. I want to keep it inside one specific area, like along a track of some sort. Help?
mouse = game.Players.LocalPlayer:GetMouse() hold = false
mouse.Button1Down:connect(function() hold = true end)
mouse.Button1Up:connect(function() hold = false end)
function Moved(X) mouse.Target.Position = Vector3.new(mouse.Hit.p.X)
end; mouse.Move:connect(Moved)
|
|
|
| Report Abuse |
|
|
BleuRBX
|
  |
| Joined: 24 Nov 2011 |
| Total Posts: 146 |
|
| |
|
BleuRBX
|
  |
| Joined: 24 Nov 2011 |
| Total Posts: 146 |
|
| |
|
BleuRBX
|
  |
| Joined: 24 Nov 2011 |
| Total Posts: 146 |
|
| |
|
|
| 09 Jan 2016 07:34 PM |
| What's the problem you're having? |
|
|
| Report Abuse |
|
|
BleuRBX
|
  |
| Joined: 24 Nov 2011 |
| Total Posts: 146 |
|
|
| 09 Jan 2016 07:47 PM |
The issue is that it moves freely anywhere along the X axis if you are dragging it with your mouse. I want to keep it inside one specific area, like along a track.
|
|
|
| Report Abuse |
|
|
BleuRBX
|
  |
| Joined: 24 Nov 2011 |
| Total Posts: 146 |
|
|
| 09 Jan 2016 07:53 PM |
Well there's that issue above AND if the brick isn't right above the center of the baseplate it will move there when you try to drag it.
|
|
|
| Report Abuse |
|
|
BleuRBX
|
  |
| Joined: 24 Nov 2011 |
| Total Posts: 146 |
|
| |
|
BleuRBX
|
  |
| Joined: 24 Nov 2011 |
| Total Posts: 146 |
|
| |
|