Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Gui Repositioning problem?

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

Use screens instead of pixels

pos = UDim2.new(0.2,0,0.3,0)

1 comment

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.