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: Gui Frame Size Change

Previous Thread :: Next Thread 
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
05 May 2012 04:23 AM
I'm yet to use a script to resize a Gui Frame i know it has something to do with UDim. This script is just a basic idea of what i want to happen. I want the second bracket to be the number in the value.
Please ask questions if you don't understand what i want.

X = script.Parent.Value.Value

while true do
script.Parent.Size = {0.03, 0}, {X, 0}
wait()
end
Report Abuse
rangersmash is not online. rangersmash
Joined: 18 Nov 2009
Total Posts: 2891
05 May 2012 04:26 AM
X = script.Parent.Value.Value
while true do
script.Parent.Size = UDim2.new(0.03,0,X,0)
wait()
end

-[ ɥsɐɯsɹǝƃuɐɹ ]-
Report Abuse
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
05 May 2012 04:31 AM
It works when the value isn't changing and matches the value number, but as the value decreases the size of the Frame doesn't.
Report Abuse
rangersmash is not online. rangersmash
Joined: 18 Nov 2009
Total Posts: 2891
05 May 2012 04:54 AM
I don't know then :P

-[ ɥsɐɯsɹǝƃuɐɹ ]-
Report Abuse
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
05 May 2012 04:59 AM
Ok, thank you for trying anyway,
If anyone else could help me it would be great, it just appears the while true do doesn't seem to be working..
Report Abuse
camscot is not online. camscot
Joined: 12 Sep 2009
Total Posts: 8
05 May 2012 05:46 AM
I will look it up on youtube and if there is an appropriate link I will post it
Report Abuse
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
05 May 2012 05:48 AM
...
Report Abuse
camscot is not online. camscot
Joined: 12 Sep 2009
Total Posts: 8
05 May 2012 05:50 AM
nope nothing.... sorry
Report Abuse
camscot is not online. camscot
Joined: 12 Sep 2009
Total Posts: 8
05 May 2012 05:50 AM
i will try to do it though
Report Abuse
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
05 May 2012 05:52 AM
Cam no just stop posting.
Report Abuse
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
05 May 2012 06:43 AM
Bump.
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
05 May 2012 07:11 AM
Wiki got this question.
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
05 May 2012 07:14 AM
X = script.Parent.Value.Value
while true do
script.Parent.Size = UDim2.new(0.03,0,X,0)
wait()
end

X.Changed:connect(change)
Report Abuse
rangersmash is not online. rangersmash
Joined: 18 Nov 2009
Total Posts: 2891
05 May 2012 07:17 AM
Fail.
X = script.Parent.Value.Value
X.Changed:connect(function(v)
script.Parent.Size = UDim2.new(0.03,0,v,0)
end)

-[ ɥsɐɯsɹǝƃuɐɹ ]-
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
05 May 2012 07:18 AM
@rangersmash i still gotta learn scripting. im getting lesseons, so yeah i fail for now! and maybe later.... *Sigh Maybe Sigh*
Report Abuse
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
05 May 2012 08:39 AM
I get this in the output ranger

14:38:11 - Workspace.Kart.Model.VehicleSeat.Ker.KerFuel.Script:2: attempt to index global 'X' (a number value)
Report Abuse
rangersmash is not online. rangersmash
Joined: 18 Nov 2009
Total Posts: 2891
05 May 2012 08:46 AM
What is the Value?
String?
NumberValue?
-[ ɥsɐɯsɹǝƃuɐɹ ]-
Report Abuse
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
05 May 2012 09:39 AM
NumberValue
Report Abuse
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
05 May 2012 11:23 AM
Bump.
Report Abuse
opplo is not online. opplo
Joined: 09 Dec 2008
Total Posts: 5320
05 May 2012 11:34 AM
Got it working took a value off the end of line 1.


X = script.Parent.Value
X.Changed:connect(function(v)
script.Parent.Size = UDim2.new(0.03,0,v,0)
end)
Report Abuse
Mendezio is not online. Mendezio
Joined: 24 Nov 2008
Total Posts: 4392
05 May 2012 12:01 PM
function OnChanged(value)

script.Parent.Size = UDim2.new(0.03,0,value,0)

wait()

end

script.Parent.Value.Changed:connect(OnChanged)
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