|
| 26 Aug 2013 06:02 PM |
This is probably an obvious mistake but why is this tweenning the gui to the top left corner?
script.Parent:TweenPosition(UDim2.new(script.Parent.Position.X.Scale, 0, -0.25, 0),"Out","Linear",2)
|
|
|
| Report Abuse |
|
|
qrrrq
|
  |
| Joined: 27 Jan 2013 |
| Total Posts: 1252 |
|
|
| 26 Aug 2013 06:09 PM |
| You can't use "script.Parent.Position.X.Scale". It need to be the specified whole integer. |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2013 06:11 PM |
What??
Even when I use a decimal It does the same thing. |
|
|
| Report Abuse |
|
|
qrrrq
|
  |
| Joined: 27 Jan 2013 |
| Total Posts: 1252 |
|
|
| 26 Aug 2013 06:14 PM |
| I read it wrong. Sorry. What is script.Parent.Position.X.Scale? (number) |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2013 06:15 PM |
| That is the guis X location... |
|
|
| Report Abuse |
|
|
qrrrq
|
  |
| Joined: 27 Jan 2013 |
| Total Posts: 1252 |
|
|
| 26 Aug 2013 06:16 PM |
| Yes, but what is the number value? Example: 1, 2, 3, 4, 5, 6 ... |
|
|
| Report Abuse |
|
|
| |
|
qrrrq
|
  |
| Joined: 27 Jan 2013 |
| Total Posts: 1252 |
|
|
| 26 Aug 2013 06:20 PM |
script.Parent:TweenPosition(UDim2.new(script.Parent.Position.X.Scale,0,-.25,0),"Out","Linear",2,true)
This works after a function. Maybe you left out the bool return value. |
|
|
| Report Abuse |
|
|
qrrrq
|
  |
| Joined: 27 Jan 2013 |
| Total Posts: 1252 |
|
|
| 26 Aug 2013 06:22 PM |
| You can use one of the various mouse techniques such as MouseEnter, MouseLeave, MouseButton1Down, etc. |
|
|
| Report Abuse |
|
|
| |
|
qrrrq
|
  |
| Joined: 27 Jan 2013 |
| Total Posts: 1252 |
|
|
| 26 Aug 2013 06:23 PM |
script.Parent.MouseButton1Down:connect(function(mouse) script.Parent:TweenPosition(UDim2.new(script.Parent.Position.X.Scale,0,-.25,0),"Out","Linear",2,true) end)
For example. |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2013 06:23 PM |
I know what I am doing...This is the rest of the script...
Tweening script.Parent is the only one that will not work.
local db = true script.Parent.MouseButton1Up:connect(function() if db then db = false script.Parent:TweenPosition(UDim2.new(script.Parent.Position.X.Scale, 0, -0.25, 0),"Out","Linear",2) script.Parent.Parent.Parent.Background2:TweenPosition(UDim2.new(0,0,2,0),"Out","Linear",2) script.Parent.Parent:TweenPosition(UDim2.new(-.9,0,0.1,0),"Out","Linear",2,false,function() script.Parent.Parent.Parent.Done.Value = "LALALA" script.Parent.Parent.Parent:Destroy() end) end end) |
|
|
| Report Abuse |
|
|
qrrrq
|
  |
| Joined: 27 Jan 2013 |
| Total Posts: 1252 |
|
|
| 26 Aug 2013 06:24 PM |
| I refer you to this: http://wiki.roblox.com/index.php/TweenPosition |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2013 06:30 PM |
I used that page to write this...
I am asking why it does not go straight up but "script.Parent" Tweens on a diagonal..Are you not understanding... |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2013 06:32 PM |
local db = true script.Parent.MouseButton1Up:connect(function() if db then db = false script.Parent:TweenPosition(UDim2.new(script.Parent.Position.X.Scale, 0, -0.25, 0),"Out","Linear",2,false) script.Parent.Parent.Parent.Background2:TweenPosition(UDim2.new(0,0,2,0),"Out","Linear",2,false) script.Parent.Parent:TweenPosition(UDim2.new(-.9,0,0.1,0),"Out","Linear",2,false,function() script.Parent.Parent.Parent.Done.Value = "LALALA" script.Parent.Parent.Parent:Destroy() end) end end) |
|
|
| Report Abuse |
|
|
qrrrq
|
  |
| Joined: 27 Jan 2013 |
| Total Posts: 1252 |
|
|
| 26 Aug 2013 06:33 PM |
Ok, I found it.
script.Parent:TweenPosition(UDim2.new(script.Parent.Position.X.Scale, 0, -0.25, 0),"Out","Linear",2) script.Parent.Parent:TweenPosition(UDim2.new(-.9,0,0.1,0),"Out","Linear",2,false,function()
On line 3 of this you are trying to send the child of a tweening Gui somewhere outside the area of the Parent.
script.Parent cannot be a child of script.Parent.Parent if you are trying to move them in opposing directions. |
|
|
| Report Abuse |
|
|
| |
|
|
| 26 Aug 2013 06:36 PM |
That makes. Lot of sense...
That should be pretty easy to fix.
Thanks. |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2013 06:38 PM |
| @Big. Only the first argument is a required one so that wouldn't make a difference considering that argument is the override booleAn and they are only being tweeted once. |
|
|
| Report Abuse |
|
|
| |
|