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 » Scripting Helpers
Home Search
 

Re: TweenPosition,,,

Previous Thread :: Next Thread 
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
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 is not online. 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
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
26 Aug 2013 06:11 PM
What??

Even when I use a decimal It does the same thing.
Report Abuse
qrrrq is not online. 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
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
26 Aug 2013 06:15 PM
That is the guis X location...
Report Abuse
qrrrq is not online. 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
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
26 Aug 2013 06:19 PM
0.4.
Report Abuse
qrrrq is not online. 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 is not online. 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
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
26 Aug 2013 06:22 PM
Bool return value? What?
Report Abuse
qrrrq is not online. 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
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
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 is not online. 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
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
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
bigdaddy92 is not online. bigdaddy92
Joined: 17 Jan 2010
Total Posts: 1684
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 is not online. 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
bigdaddy92 is not online. bigdaddy92
Joined: 17 Jan 2010
Total Posts: 1684
26 Aug 2013 06:34 PM
^ dont do drugs kids!
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
26 Aug 2013 06:36 PM
That makes. Lot of sense...

That should be pretty easy to fix.

Thanks.
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
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
bigdaddy92 is not online. bigdaddy92
Joined: 17 Jan 2010
Total Posts: 1684
26 Aug 2013 06:39 PM
stahp bul-e-eng me!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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