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
 

Using TweenPosition with StringValue

Previous Thread :: Next Thread 
KingAndrewofStuart is not online. KingAndrewofStuart
Joined: 31 Oct 2013
Total Posts: 2183
11 Jun 2017 10:09 PM
I have multiple frames that I need to tween "open and close", so I decided to make 2 StringVariables in each frame, OpenedPos and ClosedPos. The value is where I want the frame to tween.

Whenever I try to use it, it ignores the value and tweens to 0,0,0,0. There aren't any errors showing.

OpenedPos.Value = .5,-200,.5,-150

frame:TweenPosition(UDim2.new(frame:FindFirstChild("OpenedPos").Value),"Out","Sine",1)

Is this something you can do?


Report Abuse
KingAndrewofStuart is not online. KingAndrewofStuart
Joined: 31 Oct 2013
Total Posts: 2183
11 Jun 2017 10:23 PM
b


Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
11 Jun 2017 10:24 PM
OpenedPos.Value = ".5,-200,.5,-150"
---
f = frame:FindFirstChild("OpenedPos").Value:gmatch("%-?%d*%.?%d+")
frame:TweenPosition(UDim2.new(f(),f(),f(),f()),"Out","Sine",1)
Report Abuse
KingAndrewofStuart is not online. KingAndrewofStuart
Joined: 31 Oct 2013
Total Posts: 2183
11 Jun 2017 10:32 PM
That worked. Thanks.


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