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

How do i set the offset size of a frame?

Whenever I try to set the offset size of my scrolling frame, it says UDim2 expected, got number. Please help!

##Script:


local sizes =  script.Parent.ScrollingFrame
while true do
	wait(0.1)
	if script.Parent.OpeningY.Value == true then
		sizes.Size.Y.Offset = sizes.Size.Y.Offset + UDim2.new(0, 0, 1, 0)
	end
end
if sizes.Size.Y.Offset == 281 then
	script.Parent.OpeningY.Value = true
end

1 comment

0

You should use code block to give your code. It makes so much easier to read

1 answer

sizes.Size = sizes.Size + UDim2.new(0, 0, 1, 0)

You can't just edit Y or X from an Offset or Scale, it's readonly, you have to take the entire Size.

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