Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Gui Repositioning problem?

Asked by 10 years ago

I'm trying to get my code to when the Roblox application window is resized, the Gui frame will stay in the same area, at the bottom right of the screen. The code also includes a part where as soon as the application starts up, it moves the frame.But, if the window is resized, the Gui position dosent change. My frames size is 200, 300

local backgrounds = script.Parent.HomeScreen
local mode = script.Parent.Mode
local rPhone = script.Parent
local int1
local int2



repeat wait()until rPhone.AbsoluteSize.X > 0 and rPhone.AbsoluteSize.Y > 0

if int1 ~= rPhone.AbsoluteSize.X - 200 and int2 ~= rPhone.AbsoluteSize.Y -300 then
    int1 = rPhone.AbsoluteSize.X - 200
    int2 = rPhone.AbsoluteSize.Y - 300
    backgrounds.Position = UDim2.new(0, int1, 0, int2)
end

1 answer

Log in to vote
0
Answered by
aews5 15
10 years ago

Use screens instead of pixels

pos = UDim2.new(0.2,0,0.3,0)
0
The problem with using scale is that the frame includes buttons that need pixel by pixel accuracy, and you cant get that with scale. xbox789 0 — 10y
Ad

Answer this question