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
 

Re: Quick question

Previous Thread :: Next Thread 
Lem0nzzx is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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
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