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: Why wont this work? (Probably cos i made it :O)

Previous Thread :: Next Thread 
ChocCookieRaider is not online. ChocCookieRaider
Joined: 10 Mar 2012
Total Posts: 338
28 Apr 2012 10:28 AM
local BK = game.Workspace.BK
local BS = script.Parent.Parent.Parent.Blue_Statistics

while true do
script.Parent.Text = BK.Value
end

script.Parent.MouseButton1Down:connect(function()
BS:TweenPosition(UDim2.new(0.25, 0, 0.22, 0), "Out", "Quad", 3, true)
BS:TweenPosition(UDim2.new(0.25, 0, 1.8, 0), "Out", "Quad", 0.4, true)
BS:TweenPosition(UDim2.new(0.25, 0, 0.2., 0), "Out", "Quad", 0.2, true)
end

And guess what! My old friend called nothing in the output came back :D
Report Abuse
iPremiumZ is not online. iPremiumZ
Joined: 23 Jan 2012
Total Posts: 6834
28 Apr 2012 10:30 AM
ewwwwwwww TweenPosition is scary.
Report Abuse
legokid135 is not online. legokid135
Joined: 23 Jan 2009
Total Posts: 1470
28 Apr 2012 10:31 AM
local BK = game.Workspace.BK
local BS = script.Parent.Parent.Parent["Blue_Statistics"]

while wait() do
script.Parent.Text = BK.Value
end

script.Parent.MouseButton1Down:connect(function()
BS:TweenPosition(UDim2.new(0.25, 0, 0.22, 0), "Out", "Quad", 3, true)
BS:TweenPosition(UDim2.new(0.25, 0, 1.8, 0), "Out", "Quad", 0.4, true)
BS:TweenPosition(UDim2.new(0.25, 0, 0.2., 0), "Out", "Quad", 0.2, true)
end)

3 things, you needed a [" "] before and after Blue_Statistics, because of the _. You needed a wait() in the while loop, so it won't crash. Finally you needed a close parenthesis because you opened one in (function().

Try that.
Report Abuse
legokid135 is not online. legokid135
Joined: 23 Jan 2009
Total Posts: 1470
28 Apr 2012 10:31 AM
@iPremiumz, actually it's a lot more efficient than using a for loop.

~umad~
Report Abuse
iPremiumZ is not online. iPremiumZ
Joined: 23 Jan 2012
Total Posts: 6834
28 Apr 2012 10:31 AM
Yeah, but I'm terrrible with Tween, pretty good with for loops =P
Report Abuse
legokid135 is not online. legokid135
Joined: 23 Jan 2009
Total Posts: 1470
28 Apr 2012 10:33 AM
@iPremium,

It's not that hard to master as long as you know how GUIs work. Read this,
http://wiki.roblox.com/index.php/Tween

~umad~
Report Abuse
iPremiumZ is not online. iPremiumZ
Joined: 23 Jan 2012
Total Posts: 6834
28 Apr 2012 10:38 AM
So is it like:


script.Parent.Position = UDim2.new(0.5, 0, 0.5, 0)
script.Parent.Size = UDim2.new(0.5,0,0.5,0)
script.Parent:TweenSizeAndPosition(UDim2.new(0,100,0,500),UDim2.new(0.5,-100,0.5,300), "Out", "Quad", 1)
Report Abuse
legokid135 is not online. legokid135
Joined: 23 Jan 2009
Total Posts: 1470
28 Apr 2012 10:39 AM
Yes, that would work.

~umad~
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