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

How to change frame size?

Hello i am trying to instance frame and resize it but i dont know how to resize it

local dot = Instance.new("Frame")
dot.BackgroundColor3 = Color3.fromRGB(255, 255 , 255)
dot.Size = ({0, 10}{0, 10})

dot.Parent = game.StarterGui.ScreenGui.Frame

1 answer

✓ Accepted answer

You need to use a UDim2.

local dot = Instance.new("Frame") -- dont need to parent it, second argument takes parent
dot.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
dot.Size = UDim2.new(0, 10, 0, 10) -- you cant use brackets!
dot.Parent = game.StarterGui.ScreenGui.Frame

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