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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 05 May 2012 04:54 AM |
I don't know then :P
-[ ɥsɐɯsɹǝƃuɐɹ ]- |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| Joined: 09 Dec 2008 |
| Total Posts: 5320 |
|
| |
|
camscot
|
  |
| Joined: 12 Sep 2009 |
| Total Posts: 8 |
|
| |
|
camscot
|
  |
| Joined: 12 Sep 2009 |
| Total Posts: 8 |
|
|
| 05 May 2012 05:50 AM |
i will try to do it though
|
|
|
| Report Abuse |
|
|
opplo
|
  |
| Joined: 09 Dec 2008 |
| Total Posts: 5320 |
|
| |
|
opplo
|
  |
| Joined: 09 Dec 2008 |
| Total Posts: 5320 |
|
| |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
| |
|
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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 05 May 2012 08:46 AM |
What is the Value? String? NumberValue? -[ ɥsɐɯsɹǝƃuɐɹ ]- |
|
|
| Report Abuse |
|
|
opplo
|
  |
| Joined: 09 Dec 2008 |
| Total Posts: 5320 |
|
| |
|
opplo
|
  |
| Joined: 09 Dec 2008 |
| Total Posts: 5320 |
|
| |
|
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
|
  |
| 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 |
|
|