Zevios
|
  |
| Joined: 14 Sep 2013 |
| Total Posts: 504 |
|
| |
|
|
| 18 Jan 2017 10:37 AM |
Either loop the x-axis or set up a custom drag system.
~MightyDantheman~ |
|
|
| Report Abuse |
|
|
Zevios
|
  |
| Joined: 14 Sep 2013 |
| Total Posts: 504 |
|
| |
|
| |
|
Raildex
|
  |
| Joined: 06 Dec 2009 |
| Total Posts: 934 |
|
|
| 18 Jan 2017 10:40 AM |
| just have it set its x position to the same spot anytime its position is changed |
|
|
| Report Abuse |
|
|
|
| 18 Jan 2017 10:50 AM |
| loop x axis, like the person already said |
|
|
| Report Abuse |
|
|
Zevios
|
  |
| Joined: 14 Sep 2013 |
| Total Posts: 504 |
|
|
| 18 Jan 2017 11:03 AM |
Do I use the property: AnchorPoints?
looping the x axis makes 0 sense to me |
|
|
| Report Abuse |
|
|
mybowls72
|
  |
| Joined: 05 Aug 2013 |
| Total Posts: 2688 |
|
| |
|
RobuxLife
|
  |
| Joined: 19 Sep 2012 |
| Total Posts: 13336 |
|
|
| 18 Jan 2017 11:12 AM |
Looping the X axis means your keeping the X property the same. So, if it's moved, keep it in the same position.
|
|
|
| Report Abuse |
|
|
RogueMage
|
  |
| Joined: 28 Jan 2012 |
| Total Posts: 1235 |
|
|
| 18 Jan 2017 11:16 AM |
game:GetService("RunService").RenderStepped:Connect(function() gui.DragBegin:Connect(function(originalPosition) gui.Position.X.Scale = originalPosition.X.Scale end) end) |
|
|
| Report Abuse |
|
|
OzzyFin
|
  |
| Joined: 07 Jun 2011 |
| Total Posts: 3600 |
|
| |
|
Raildex
|
  |
| Joined: 06 Dec 2009 |
| Total Posts: 934 |
|
|
| 18 Jan 2017 11:21 AM |
game:GetService("RunService").RenderStepped:Connect(function() gui.DragBegin:Connect(function(originalPosition) gui.Position = UDim2.new(originalPosition.X.Scale,0,gui.Position.Y.Scale,0) end) end) |
|
|
| Report Abuse |
|
|
RogueMage
|
  |
| Joined: 28 Jan 2012 |
| Total Posts: 1235 |
|
|
| 18 Jan 2017 11:21 AM |
aaaaaaaaaaa
local xPositionScale = gui.Position.X.Scale local xPositionOffset = gui.Position.X.Offset local yPositionScale = gui.Position.Y.Scale local yPositionOffset = gui.Position.Y.Offset
game:GetService("RunService").RenderStepped:Connect(function() yPositionScale = gui.Position.Y.Scale yPositionOffset = gui.Position.Y.Offset gui.DragBegin:Connect(function() gui.Position = UDim2.new(xPositionScale, xPositionOffset, yPositionScale, yPositionOffset) end) end)
-- don't even know if this will work i pulled it out of my butt |
|
|
| Report Abuse |
|
|
Zevios
|
  |
| Joined: 14 Sep 2013 |
| Total Posts: 504 |
|
|
| 18 Jan 2017 11:23 AM |
gui = script.Parent
while true do wait() gui.Position = UDim2.new(0,31,0,120) end
So Im not sure how to only stop the dragging in the X axis and the way I done it is very glitchy because when you drag, the gui keeps going back and forth.
Please help if you can, thanks |
|
|
| Report Abuse |
|
|
RogueMage
|
  |
| Joined: 28 Jan 2012 |
| Total Posts: 1235 |
|
|
| 18 Jan 2017 11:24 AM |
dont do a while true loop
that's stupid |
|
|
| Report Abuse |
|
|
Zevios
|
  |
| Joined: 14 Sep 2013 |
| Total Posts: 504 |
|
|
| 18 Jan 2017 11:25 AM |
@Rogue thank you it worked!
|
|
|
| Report Abuse |
|
|
Zevios
|
  |
| Joined: 14 Sep 2013 |
| Total Posts: 504 |
|
| |
|
RogueMage
|
  |
| Joined: 28 Jan 2012 |
| Total Posts: 1235 |
|
|
| 18 Jan 2017 11:26 AM |
np my dude
i feel good now that i pulled code out of my ass yet it still worked
nice |
|
|
| Report Abuse |
|
|