Lem0nzzx
|
  |
| Joined: 08 Feb 2016 |
| Total Posts: 1604 |
|
|
| 06 Oct 2016 07:49 PM |
How do I change a numbervalue to the value of a frame's X size?
|
|
|
| Report Abuse |
|
|
Lem0nzzx
|
  |
| Joined: 08 Feb 2016 |
| Total Posts: 1604 |
|
|
| 06 Oct 2016 07:50 PM |
I tried num.Value = frame.Size.X , but there's 2 values for X.
|
|
|
| Report Abuse |
|
|
Lem0nzzx
|
  |
| Joined: 08 Feb 2016 |
| Total Posts: 1604 |
|
|
| 06 Oct 2016 07:52 PM |
When I print it, it always says the numbervalue = 0. So idk the issue, I'd like some help please.
|
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 06 Oct 2016 08:09 PM |
val.Value = gui.AbsoluteSize.X
Why would you want to do this anyways?
|
|
|
| Report Abuse |
|
|
Lem0nzzx
|
  |
| Joined: 08 Feb 2016 |
| Total Posts: 1604 |
|
|
| 06 Oct 2016 08:11 PM |
Yikes tried that it just printed 200 constantly LOL
I'm using it so I can connect a changed function to it. If I can connect the changed function to it, then I can manipulate when a gui changes it's color once the frame's size hits a point.
|
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 06 Oct 2016 08:12 PM |
@Lemon
gui.Changed:connect(function(prop) if prop == 'AbsoluteSize' then print('gui size was changed') end end)
|
|
|
| Report Abuse |
|
|
Lem0nzzx
|
  |
| Joined: 08 Feb 2016 |
| Total Posts: 1604 |
|
|
| 06 Oct 2016 08:14 PM |
That's not exactly what I'm trying to do. You see sometimes i need something to happen when the size is half the size it needs to be. Yet sometimes I need it to do something when it's a quarter of the size. I legit just need to get the size of the X value, without getting 2 values.
|
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 06 Oct 2016 08:18 PM |
I understand that.
local SizeX = gui.AbsoluteSize.X
gui.Changed:connect(function(prop) if prop == 'AbsoluteSize' then if gui.AbsoluteSize.X == SizeX/2 then --do something end end end)
|
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 06 Oct 2016 08:21 PM |
>_<
Gui.Position.X.Scale or Gui.Position.X.Offset |
|
|
| Report Abuse |
|
|
Lem0nzzx
|
  |
| Joined: 08 Feb 2016 |
| Total Posts: 1604 |
|
|
| 06 Oct 2016 08:24 PM |
I'm dead. THANKS DEVVINCE, you too timeticks you were extremely helpful.
|
|
|
| Report Abuse |
|
|