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 » Scripters
Home Search
 

Re: Trouble with brick dragging

Previous Thread :: Next Thread 
BleuRBX is not online. 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 is not online. BleuRBX
Joined: 24 Nov 2011
Total Posts: 146
08 Jan 2016 08:48 PM
bump


Report Abuse
BleuRBX is not online. BleuRBX
Joined: 24 Nov 2011
Total Posts: 146
09 Jan 2016 06:02 PM
bump :l


Report Abuse
BleuRBX is not online. BleuRBX
Joined: 24 Nov 2011
Total Posts: 146
09 Jan 2016 07:23 PM
bump 3 :(


Report Abuse
greedyawesomeman is not online. greedyawesomeman
Joined: 18 Apr 2010
Total Posts: 1038
09 Jan 2016 07:34 PM
What's the problem you're having?
Report Abuse
BleuRBX is not online. 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 is not online. 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 is not online. BleuRBX
Joined: 24 Nov 2011
Total Posts: 146
09 Jan 2016 08:10 PM
b


Report Abuse
BleuRBX is not online. BleuRBX
Joined: 24 Nov 2011
Total Posts: 146
10 Jan 2016 11:36 AM
b2


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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