Secrets are not saving or being created on Roblox Studio

I am creating new Secrets in Roblox Studio under Game Settings > Security > Local Secrets

For example, here’s a NewSecret secret:

When I try to access this secret in the following script:

local Secret = game:GetService('HttpService'):GetSecret('NewSecret')

I get the error:
image

Despite the secret having been created:

And when I publish the game and re-open Roblox Studio, the “NewSecret” secret which I have just created no longer exists.

Affected Place ID: 7041939546

4 Likes

You created a Local Secret in Game Settings > Security, but:

  • It disappears after restarting Studio
  • HttpService:GetSecret("NewSecret") throws
    HttpService::GetSecret must be run under a player session

Local Secrets do NOT save to the cloud — they exist only on your device, per-install, and only load in a Play session, not edit mode.

Roblox nukes them when Studio restarts (bug/expected behavior depending who you ask :sweat_smile:).

Also: You can only call GetSecret() during play in a LocalScript or server script while the game is running, not during editing.

local HttpService = game:GetService("HttpService")
local secret = HttpService:GetSecret("NewSecret")

print("Secret Value:", secret:GetValue())

omg im so scared it doesnt work… its fr muneeb…

IF IT DOESNT WORK DONT BLAME ME IM NOT THAT GOOD

Yes, Local Secrets are for use in Studio only. But no, they are not meant to get wiped after each restart of Studio.

I have 7 other Local Secrets set on the place and they work perfectly fine, and load every time after I restart studio. But the issue I have is that any new ones that I am creating aren’t saving anymore.

have you tried making the secrets on the platform and not in studio?

the problem could be studio having some bugs but in the platform im sure it will work

also studio right now has some problems… dont publish anything because youll get a strike its something weird rn its viral in forum

I’m also experiencing this issue and have submitted a report:

^^ This is exactly what I’m experiencing. It works in one place but not another (same key and name)

have you guys tried making the secrets on the games plataform site?

Those secrets only work in running instances or team test, not local servers. This is to protect your keys from files on your computer that may try to download them.

That’s why you have to put them in two places:

  1. Secrets Store (in your image): allow live servers to access keys
  2. Local secrets: so you can test it in studio before publishing

Q: Is this AI generated?

There is no GetValue method of Secrets… that would defeat the point of keeping it secure.
Also Secrets cannot be called on the client (as in LocalScripts or scripts with Client RunContext) for obvious reasons.

It seems AI generated but refined by you. Please do not post or reply if you do not know what you’re talking about!

yes its AI, but only because i dont know how to explain it i agree :GetValue is not a real thing but i just wanted to help because, i have also had this bug… but I and muneeb were the only ones acting so it was like 2 for 1, and do you know the answer to his post or you just went here to say i was wrong?

Bro should of kept the AI because I cannot understand what he’s saying.
No way you were using secrets yourself because you would have NOT said that. Also @7eoeb:

  1. Explained the bug was already submitted and said the issue was also occurring for them
  2. Explained to you why you can’t set put it in the creator dashboard
  3. Confirmed your response added no context as the code wasn’t real
  4. You don’t know the answer either as it’s not fixable

Hey all!

Just letting you know that we’re actively working on this issue and will update this thread when we have more information!

3 Likes

I have a similar issue which is probably related. The OpenCloud API keys always fail to save in studio local secrets and if the secret already existed, the previous value will be kept instead. In case of creating a new secret it won’t save and will be gone from the in-studio game settings local secrets menu after restart. I assume it has something to do with the length as shorter strings including cut OpenCloud API keys always save correctly. This issue makes it impossible to use and test OpenCloud APIs in studio.

We have identified that root cause as a platform limitation that restricts the total amount of data that can be stored for local secrets to approximately 2500 bytes.

One quick workaround you can try is to keep only the secrets that are necessary, remove unused entries, and shorten secret names where possible to stay within this limit, though we understand this is not applicable in all scenarios. We are active looking into a longer term solution.

The issue still happens btw
Is the staff still trying to fix it? I’m unable to create new local secrets and editing the value of previously created ones doesn’t work

Any news about the fix ? It is still happening. I need to store multiple API keys because I am separating their scopes and it’s ultra annoying to have to test in live games instead of directly within Studio.

We don’t have an ETA yet. We are evaluating more options for storing secrets locally. We understand the inconvenience and will share updates as soon as we have them.

1 Like