SnokeITFO
|
  |
| Joined: 02 Sep 2014 |
| Total Posts: 1212 |
|
|
| 01 Jan 2016 01:56 AM |
On studio the GUIs are in perfect position
But in game they're scattered
Can someone fix the GUI positions for me? |
|
|
| Report Abuse |
|
SnokeITFO
|
  |
| Joined: 02 Sep 2014 |
| Total Posts: 1212 |
|
| |
|
| 01 Jan 2016 02:17 AM |
| which game? I will try and fix them. |
|
|
| Report Abuse |
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
|
| 01 Jan 2016 02:24 AM |
Get it how you want, run this in command line and save the GUI:
repeat wait() until workspace.CurrentCamera.ViewportSize ~= Vector2.new() function toScale(instance) for _,v in pairs(instance:GetChildren()) do if v:IsA("GuiObject") then local size = v.Parent:IsA("GuiObject") and v.Parent.AbsoluteSize or workspace.CurrentCamera.ViewportSize local pos = v.AbsolutePosition - (v.Parent:IsA("GuiObject") and v.Parent.AbsolutePosition or Vector2.new()) v.Size = UDim2.new(v.AbsoluteSize.X/size.X, 0 , v.AbsoluteSize.Y/size.Y) v.Position = UDim2.new(pos.X/size.X, 0 , pos.Y/size.Y) end toScale(v) end return end toScale(game.StarterGui) |
|
|
| Report Abuse |
|