ScrollTo Method Issue

Thank you for your reply, however, the method works when accessing it directly, and returns an error when calling the method after assigning it to a constant, it has nothing to do with the item being rendered or not.