I've kept my Scripts folder synced with Microsoft OneDrive for years.
With the latest updates to OneDrive on MacOS, the location of the OneDrive files has changed. Instead of being in a user-selected location, the files have been moved to a folder within ~/Library/CloudStorage/ with a symlink in the original folder location:
Unfortunately, after this change I am unable to set the Scripts folder to a location within my OneDrive folder.
I can Open and Save documents from within the folder, but I am unable to set the folder to be my Scripts folder in the Server Properties, or to use the Search tool to find items in this folder.