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

How Do I resize a Gui via Script?

Asked by 10 years ago
frame = script.Parent
print("daldgkha;legkhas;lefkhase;lfk"..UDim2.new(0,frame.Size.X.Offset + 1, 0, frame.Size.Y.Offset + 10))

I need to resize Guis like this for my main script

while true do
item = script.Parent
itempos = item.Position
itemsize = item.Size
item.Draggable = true -------

backroundchild = playergui.SideGui.Frame.Backround:GetChildren()

for i = 1, #backroundchild do

--print(backroundchild[i].Name)

if itempos > backroundchild[i].Position and itempos < Udim2.new(backroundchild[i].Position + backroundchild[i].Size) then --if itempos > backroundchild[i].Position and itempos < Udim2.new(backroundchild[i].Position + backroundchild[i].Size) then

print("between")

end -- if itempostion is between backroundchild end

end --For i = 1, #backroundchild do end






wait(3) --change just there to avoid infinite loop break
end -- While True Do End

All the variables check out in both, idk just how to add them up

This is straight from Roblox Wiki

"UDim2 + UDim2 returns UDim2 with each component added individually"

Help?

Answer this question