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: Gui Screen

Previous Thread :: Next Thread 
madman5533 is not online. madman5533
Joined: 12 Mar 2009
Total Posts: 181
19 Jun 2015 09:10 PM
How do i make a Gui that will cover the whole screen and so it will be perfectly in the middle? How do i do this so it will cover the whole screen no matter how big or little the screen is of the person that is playing it?
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
19 Jun 2015 09:17 PM
function SetPosToMiddle(frame)
frame.Position = UDim2.new(1-(frame.Position.X.Scale)/2,0,1-(frame.Position.Y.Scale)/2,0)
end

SetPosToMiddle(game.StarterGui.ScreenGui.Frame)
Report Abuse
madman5533 is not online. madman5533
Joined: 12 Mar 2009
Total Posts: 181
19 Jun 2015 10:07 PM
How do i make it so it covers the whole screen regardless of the players computer size?
Report Abuse
FOXmcloud021 is not online. FOXmcloud021
Joined: 14 Apr 2012
Total Posts: 3512
19 Jun 2015 10:09 PM
Whole Screen: {1,0},{1,0}



Logic is best
Report Abuse
madman5533 is not online. madman5533
Joined: 12 Mar 2009
Total Posts: 181
19 Jun 2015 10:11 PM
Will this be the same size on anyone's computer regardless of there computer size?
Report Abuse
FOXmcloud021 is not online. FOXmcloud021
Joined: 14 Apr 2012
Total Posts: 3512
19 Jun 2015 10:12 PM
Yeah
The (#,0,#,0) fits the screen size of everyone,

but the (0,#,0,#) just fits what is selected and has no boundaries/references points from the monitor



Logic is best
Report Abuse
GeoVolcano is not online. GeoVolcano
Joined: 05 Jul 2012
Total Posts: 1433
19 Jun 2015 10:12 PM
yes
Report Abuse
madman5533 is not online. madman5533
Joined: 12 Mar 2009
Total Posts: 181
19 Jun 2015 10:14 PM
Here is my script, i'm lost...

local screenGui=Instance.new("ScreenGui")
screenGui.Parent=script.Parent

local frame=Instance.new("Frame")
frame.Parent=screenGui
frame.Size=UDim2.new(1,0,1,0)
function SetPosToMiddle(frame)
frame.Position = UDim2.new(1-(frame.Position.X.Scale)/2,0,1-(frame.Position.Y.Scale)/2,0)

end

SetPosToMiddle(game.StarterGui.ScreenGui.Frame)
Report Abuse
FOXmcloud021 is not online. FOXmcloud021
Joined: 14 Apr 2012
Total Posts: 3512
19 Jun 2015 10:16 PM
you do not need the

"
function SetPosToMiddle(frame)
frame.Position = UDim2.new(1-(frame.Position.X.Scale)/2,0,1-(frame.Position.Y.Scale)/2,0)

end

SetPosToMiddle(game.StarterGui.ScreenGui.Frame)
"

Just set the size and do this for the position:

"frame.Position = UDim2.new(0,0,0,0)"



Logic is best
Report Abuse
madman5533 is not online. madman5533
Joined: 12 Mar 2009
Total Posts: 181
19 Jun 2015 10:16 PM
It's not centering it in the middle...
Report Abuse
FOXmcloud021 is not online. FOXmcloud021
Joined: 14 Apr 2012
Total Posts: 3512
19 Jun 2015 10:18 PM
local screenGui=Instance.new("ScreenGui")
screenGui.Parent=script.Parent

local frame=Instance.new("Frame")
frame.Parent=screenGui
frame.Size=UDim2.new(1,0,1,0)
frame.Position = UDim2.new(0,0,0,0)

--This worked for me



Logic is best
Report Abuse
madman5533 is not online. madman5533
Joined: 12 Mar 2009
Total Posts: 181
19 Jun 2015 10:29 PM
How do i make it centered in the middle if my script looks like this...


local screenGui=Instance.new("ScreenGui")
screenGui.Parent=script.Parent

local frame=Instance.new("Frame")
frame.Parent=screenGui
frame.Size=UDim2.new(0.5,0,0.5,0)
frame.Position=UDim2.new(0,0,0,0)
Report Abuse
FOXmcloud021 is not online. FOXmcloud021
Joined: 14 Apr 2012
Total Posts: 3512
19 Jun 2015 10:32 PM
local screenGui=Instance.new("ScreenGui")
screenGui.Parent=script.Parent

local frame=Instance.new("Frame")
frame.Parent=screenGui
frame.Size=UDim2.new(0.5,0,0.5,0)
frame.Position=UDim2.new(0.25,0,0.25,0)


You can mess with the sizes and positions to get the solution you desire in other situations



Logic is best
Report Abuse
madman5533 is not online. madman5533
Joined: 12 Mar 2009
Total Posts: 181
19 Jun 2015 10:41 PM
Thanks.
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