Roberta, ordered by her grandfather, Captain Moreland to cut her hair and dress up like a cabin boy named "Bertie" to avoid suspicions from Kuala and his band of cutthroat pirates, is first seen first seen lying on the beach of an island tied up along with her grandfather after the pirates led by Kuala took their ship and captured them. Roberta wishes the pirates could fight and kill each other off when she sees that her grandfather is shocked to see the pirates open a chest that belonged and was given to him by his late first officer.
When Kuala and some of the pirates approach them, her grandfather does everything he can to talk his way out of this so as to avoid the pirates trying to find out that "Bertie" is really a girl in disguise. Then, he makes a ransom deal with Kuala; a large amount of money in exchange for their freedom as long as Captain Moreland is the one who writes the ransom note. Kuala agrees to let them go after they have ransomed them and have been paid as promised. When Kuala takes "Bertie" with them, Captain Moreland threatens not to write the ransom note unless they give him back "Bertie". To make sure he gets what he wants, Kuala places "Bertie" back with Captain Moreland and then returns to join the rest of his men as Captain Moreland helps "Bertie" up.
Then, her grandfather tells her to keep quiet while the pirates decide which crew is going to take them. Then, a couple boys named Fritz and Ernst Robinson come to their rescue. As happy as he is to know that help is on the way, Captain Moreland insists the boys free "Bertie" first. Captain Moreland knows that he is out of harm's way since he is too valuable for the pirates to ransom. As the pirates start fighting and killing each other, Kuala and some of his men spot the boys helping the prisoners to escape, so, he orders his men to stop the fight and go after the boys. With "Bertie" free and Captain Moreland still tied up, the Captain insists they leave without him no matter as the pirates get closer. So, Captain Moreland stays behind as the pirates hold him while the others go after the boys and their prisoner.
Roberta did not appear in the original novel. Instead, a young lady named Jenny comes to live with them towards the end of Isabelle de Montolieu's version of the novel. She was shipwrecked on a neighboring island. In Wyss' version, her name is Emily Montrose, an English girl found on Smoking Rock near the end of the novel. She is shy, but soon is adopted into the family.