So this is probably a dumb problem, but I am unable to change the GuiObject size using my script. Perhaps there’s a mistake in my script, I just don’t know. Please help, thanks!
Script:
local teams = game:GetService("Teams")
local teamnum = teams:GetChildren()
local scrollingFrame = script.Parent.Parent.Parent.ScrollingFrame
local lastPos = -0.118
for i = 1, #teamnum do
local teamButton = Instance.new("TextButton", scrollingFrame)
teamButton.Size = UDim2.new(0,198,0, 50)
teamButton.Position = UDim2.new(0,0,lastPos+0.118,0)
lastPos = lastPos+0.118
wait()
end
Intended Size:

Resulted Size:

Explorer:
