When I started scripting this I thought it would be easy, but after trying everything I could think of nothing worked, some methods like setting the Y position of the scrolling frame to AbsoluteCanvasSize.Y only scrolled to the bottom halfway and setting the Y position of the scrolling frame to math.huge did nothing, I have looked thru each devforum topic related to this issue and tried all the answers, but none of them worked as well. Please someone help me figure this out.
local f = script.Parent
f.ChildAdded:Connect(function()
f.CanvasPosition = Vector2.new(0, f.AbsoluteCanvasSize.Y) -- does not work even with setting this to math.huge
end)
As an last attempt I tried discord’s new chat AI bot Clyde which gave me the right answer
-- get the scrolling frame
local scrollingFrame = script.Parent
-- listen for child added events
scrollingFrame.ChildAdded:Connect(function(child)
wait() -- delay for one frame to ensure child has been positioned
-- set the canvasPosition to the bottom of the scrolling frame
scrollingFrame.CanvasPosition = Vector2.new(0, scrollingFrame.CanvasSize.Y.Offset - scrollingFrame.AbsoluteSize.Y)
end)
(I changed the wait() line to game:GetService(“RunService”).RenderStepped:Wait())
I am guessing that you are referring to how I used the bot. The bot has been gives to a few servers to test and I got invited to one of them luckily, but the server asked not to share the invite link so I cant invite you there. U could just ask chatGPT since the discord bot uses the same AI as chatGPT.