I have no clue why this is erroring if anyone could help me, would be much appreciated.
-- This is a OrderedDataStore function copInfo:createProfile(p, username, password) local newTbl = {username, password} newTbl = http:JSONEncode(newTbl) pcLoginDs:SetAsync(p.UserId, newTbl) -- LINE 178 end copInfo:createProfile(plrs:WaitForChild("papasherms"), "test1", "test2") -- LINE 181
ERROR: 103: string is not allowed in DataStore Stack Begin Script 'ServerScriptService.mainScript', Line 178 - method createProfile Script 'ServerScriptService.mainScript', Line 181 Stack End
https://wiki.roblox.com/index.php?title=API:Class/OrderedDataStore
"OrderedDataStore is a type of DataStore where the value must be an integer (positive number)"
You can only store ints in ordered data stores, for anything else you should use a global data store.
OrderedDataStores can't store strings, use a DataStore instead.
Replace the pcLoginDs variable with:
local pcLoginDs = game:GetService('DataStoreService'):GetDataStore('the name you put for your datastore')