Saving Part Size

I need help with saving a part size as you leave, e.g. when you leave, the part’s size will save so when you join back, it will be as it was before.

Can anybody link me any articles/ help me with how I can do this?

Thank you.

Hello 49xi, A efficient method of doing this would be using Roblox Data Store Service they provide. You could begin by making a script that creates a string value inside of each player when they join. Second you could create a script that simply puts the size of the part into the string value repeatedly in a loop. Third you would create your Data Store script in ServerScriptService and make it so it saves the string value and every time the player joins it sets the specified parts size to the string values Value locally. If you need help creating a data store script please head to YouTube since there are hundreds of helpful tutorials for creating data stores

1 Like

Thank you very much for the help!

You’ll need to save the X, Y, and Z value, since you can’t store a Vector or instances/objects inside a datastore.

Example:

local Table = {
   X = Part.Size.X,
   Y = Part.Size.Y,
   Z = Part.Size.Z
}

Then you can do the following to access it:

Part.Size = Vector3.new(Table.X, Table.Y, Table.Z)

No problem, I’m glad you found it helpful!

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