Code not saving assets into plugin, please help

Issue has been resolved, thanks for everyone’s help!

1 Like

Check what type of data is saved in the plugin. You can only set values ​​in :SetSetting() for these data types:


table

string

number
2 Likes

The table reminder brings up a point that i may have been serializing my instances incorrectly using RoSe (my instance serializer of choice.)

2 Likes

turns out i was serializing it right, but the problem still persists even after tweaking the code sadly.

What serializedAssetsFolder returns?

it returns the serialized folder with the users inserted assets.

What does this mean, please explain in more detail.

1 Like

sorry bout that, i just recently started learning about serialization, basically, from what i understand, it converts the folder into a table (with it’s children) to be saved.

Okay, show me what your serialization outputs to the console.

so, one minute it was working, but now, its just returning nil.

I’m not really sure about how the rose library works, however, plugin settings can only save plain text, numbers, booleans and tables with the same restrictions.

Small rant about code quality

You shouldn’t do this

connections[math.random(0, 1000)]

What if the seed emits the same number twice, which can definitely happen?

Instead, just use table.insert, its faster, and a cleanup iterator, which is probably why you’re doing this, will run a lot faster as it doesn’t have to jump around a hashmap

table.insert(connections, e:Connect(function()

end))
1 Like

oh, thanks! i knew my code would in up doing that so i appreciate the tip.

even after testing it in a simpler way and making a diff plugin to test it, it still dosen’t work, and, whats weirder, it works after i save as a local plugin again, so i don’t know what going on anymore, so im just gonna publish as a plugin later.

I was able to get it working! but thanks for the help! i’ll mark your first reply as the solution.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.