Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why can't I store an ObjectValue in DataStorage?

Asked by 7 years ago
Edited 7 years ago

I'm trying like crazy to store my character customization data and I don't know what to do now

Error

1104: Cannot store Array in DataStore
2Stack Begin
3Script 'ServerScriptService.DataStore', Line 83
4Stack End
5104: Cannot store Array in DataStore
6Stack Begin
7Script 'ServerScriptService.DataStore', Line 111
8Stack End

Datastore Script

001local DataStore = game:GetService("DataStoreService"):GetDataStore("Test11")
002 
003 
004--CREATES THE PLAYER DATA FOLDER
005game.Players.PlayerAdded:connect(function(plr)
006    --USER DATA KEY
007    local Key = "O-"..plr.userId
008 
009    --DATA FOLDER
010    local PlrFolder = Instance.new("Folder", plr)
011    PlrFolder.Name = "Data"
012 
013    --CUSTOMIZATION DATA
014    local Character = Instance.new("Folder", PlrFolder)
015    Character.Name = "Character"
View all 112 lines...
0
Please accept my answer Void_Frost 571 — 7y

1 answer

Log in to vote
1
Answered by 7 years ago

Simply, (Sorry this is going to SUCK to fix) You cannot save physical objects (Anything created with Instance.new()) You can only save data. So Instead of creating a Color3 with Instance.new("Color3Value") Then changing that data, you would have to save it in a table or something. (You might be able to save a Color3.new())

0
Oh Dam! Thanks for the answer =p. It's going to be a pain rewriting some lines. lSernalokl 0 — 7y
Ad

Answer this question