Is there a data store for plugins?

I’m almost done making a saving system for a plugin using DataStoreService. The problem is when I run the plugin on a baseplate it gives me a Http Forbidden error because I don’t have API services enabled. How would I save data if the player’s game doesn’t have API services enabled?

local StudioService = game:GetService("StudioService")
local UserId = StudioService:GetUserId()
local PLAYER = "Player_"..UserId
local Selection = game:GetService("Selection")
local DataStoreService = game:GetService("DataStoreService")
local DataTexture = DataStoreService:GetDataStore("Textures")
local DataSurface = DataStoreService:GetDataStore("SurfaceAppearance")
local TextureValue = DataTexture:GetAsync(PLAYER)
local SurfaceValue = DataSurface:GetAsync(PLAYER)

Assuming you’re working on an already published game, here’s where you can enable that setting.

That is not the point. It is a plugin not a game.

So are you simply attempting to save data for the plugin itself?

Yes, like how the InCommand plugin saves scripts even if your game doesn’t have API enabled

Then I believe what you may be looking for are plugin.GetSetting and plugin.SetSetting?

1 Like

This seems like something I need. I’m ganna see if it can save tables.

I’m certain they are able to, as someone who’s dabbled in plugin making I’ve already had experience with these.

Just make sure to check if the plugin:GetSetting doesn’t return anything to set it thereafter.

1 Like