|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 19 Jun 2015 10:09 PM |
Whole Screen: {1,0},{1,0}
Logic is best |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2015 10:11 PM |
| Will this be the same size on anyone's computer regardless of there computer size? |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
| |
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 19 Jun 2015 10:16 PM |
| It's not centering it in the middle... |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
| |
|