RBLXSerialize - a easy to use and really cool all-in-one Roblox Serializer

wait wouldnt it be better to store the token in a datastore? somewhere thats not easy to access?

2 Likes

Hmm, good point well made. I never really thought of datastores because I hate them so much but yeah that way is more secure by far.

Yeah, you can make a Model Storage Datastore or M.S.D, with the combination of this module

you can actually make a datastore that stores alot of models via strings/tokens. Which can be accessed by the name of the model (or however you want it). That would be a cool thing to do.

Besides the models themselves barely take any space in datastores (Kb < 4MB limit).

Need to store models of rooms for missions and etc? simple use this module and serialize them. After that, you store the token/BinaryString into a DataStore called “MissionRooms” and assign a name to them so that you can identify them.

1 Like

I understood that part, the issue I’m having is why is the client gaining access to said trello token/auth code?? If it’s stored on the server they can’t access it?

This is great stuff. I’ve been working on something similar in the form of a single module, parented to game. The module acts exactly like a service, and the code is executed through the command bar with a require(module:Clone()), so it can be changed and executed without having to reseat the module.

Alright, I’ve released a counterpart to this module called RBNSR.

It’s used if you dont need to store full instances, and allows you to store tables /w DataTypes supported in this list. (Its a single modulescript).

How can i make it so that the things that this module serializes (aka the table it produces) saves to where i want it to be other than datastores?

It doesn’t matter where you store the string, it will work regardless. So if you’d like to store it in a variable that’s fine. You could also store it inside of a StringValue if you’d like. As long as the string remains unmodified it will work.

whaaat? ok you just grilled my brain, so the string contains ALL of the data to deserialize?

This is an interesting module. Out of curiosity, is there ever a use case where you need to save entire models to a datastore? Not sure if encoding Instances are necessary.

I’m pretty sure that the entire purpose of the module is to compress data into as short of a string as possible. The main use case for this would probably be for datastores or saving values to decode later.

Took me a good while to respond to this but; Yeah this is defintely a lazy solution but a easy one. That’s why i strived to make it as small as possible.I have the ultimate module that i’ll release soon. Which essentially merges all serilization into one. Inlcuding lua tables, metatables, instances, all roblox datatypes and pretty much anything that can be stored into a value.

Umm welds dont save, My house broke

or a hacky way to load meshparts

local loadService = game:GetService("LoadService")
local meshid = "urmeshid"
local mesh = loadService:LoadAsset(meshid)
mesh.Parent = workspace

imagine if loadservice didnt exist lol

yeah thats a way to bypass the issue, but the problem is to get the link of the meshobject.

something that’s hard.

what do you mean?

print(meshPart.MeshId) -- meshid

works for me.

oh? ok then yeah thanks for the tip!

Its just not writeable, but readable. Thats not true for scripts though.

They should, werid. Try .AutoRename enabled.

Hey, I’m currently experiencing issues when attempting to Encode Enums in version v0.7. The specific Enum I’m testing with is Enum.KeyCode.LeftShift.

Here’s a usage example Serialization.Encode(Enum.KeyCode.LeftShift), which results in the error: RBLXSerialize.Convertors:57: attempt to index nil with 'Value'.

The error seems to be caused because you’re not providing enough arguments for the EnumItem Convertor.

Value ModuleScript

	local convertor = convertors[ ValueType ]
	if convertor  then
		local converted = convertor(true, value)
		if converted then 
			return ValueString .. Binary.describe("DataType",ValueType)..Binary.describe("Value",converted)
		else 
			return nil 
		end
	else 
		return nil 
	end

Convertors ModuleScript

	["EnumItem"] = function(isClass,API,SubEnum,EnumValue) 
		if isClass then
			return string.pack("I2",EnumValue.Value)
		else 	
			return EnumStorage[Enum[SubEnum]][string.unpack("I2",EnumValue)]	
		end
	end,

You’re providing the function function(isClass,API,SubEnum,EnumValue) only two values convertor(true, value). So when return string.pack("I2",EnumValue.Value) is ran, EnumValue is nil.

I went ahead and did a bandaid fix on this, to see if that was the entire issue, but you’re also experiencing a very similar issue when Decoding.

I’m curious, am I using your Library wrong or are these legitimate bugs in your library? I feel like I’m using it wrong because the ‘bugs’ seem so straightforward, it’s as if whenever changes were made to the Enums handling, they were never tested.