I ran into a problem that the name of my date store is too long, although it only contains 6 letters.
Name data store in script:
local datastore = game:GetService("DataStoreService"):GetDataStore('CarPR')
I ran into a problem that the name of my date store is too long, although it only contains 6 letters.
Name data store in script:
local datastore = game:GetService("DataStoreService"):GetDataStore('CarPR')
Upon testing it works fine for me, what error is it giving you?
This is error in console
15:44:42.865 â–¶ DataStoreService: KeyNameLimit: Key name exceeds the 50 character limit. API: GetAsync, Data Store: CarPR (x2) - Studio
That error code is for the :GetAsync
method of the datastore, not its name
As an example if you were to do:
local value = datastore:GetAsync("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz")
you’d get the same error because the datastore key’s name is too long (over 50 characters/letters)
Yeah, your data store key’s can’t be over 50 characters, it’s not an issue with the datastore but the key you are trying to store data in
Just make the name of the key shorter and it should work
are there any parts of the script that do datastore:GetAsync()
? if so please show the code
This post has already been solved, the op just hasn’t marked any posts as solutions
This is name DataStore in ServerScriptService. This is name shorty “CarPR”.
local playerTable = {}
local cooldownTime = 3
local HttpService = game:GetService("HttpService")
local datastore = game:GetService("DataStoreService"):GetDataStore('CarPR')
local carfolder = game.ReplicatedStorage.Car
local upd = carfolder.Remote.UpdGar
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.