How would you access DataStores from outside of the game?

So I want myself and everyone else know how could you access DataStores without being inside of the game?

Example #1: If I wanted to change a players Stats but not inside the game itself.
Example #2: Unbanning a player without them having to join the game.
Example #3: Completely reset a players stats without them being in the game.
ect…

This is my current DataStore2:

local bannedds = require(game.ReplicatedStorage.MainModule)
game.Players.PlayerAdded:Connect(function(player)
	if player.UserId ~= 996906122 then
	local bdtable = {
	 databan1 = bannedds("BannedCheck1", player);
	 databan2 = bannedds("BannedCheck2", player);
	 databan3 = bannedds("BannedCheck3", player);
	 databan4 = bannedds("BannedCheck4", player);
	 databanreason = bannedds("ReasonOfBan", player)
	}
	
	
	local plrfold = game.ReplicatedStorage:WaitForChild(player.UserId)
	local banfold = Instance.new("Folder", plrfold)
		banfold.Name = "BanFolder"
	--//Create/Save Bans
	local ban1 = Instance.new("BoolValue", banfold)
		ban1.Name = "BannedCheck1"
		
	local ban2 = Instance.new("BoolValue", banfold)
		ban2.Name = "BannedCheck2"
		
	local ban3 = Instance.new("BoolValue", banfold)
		ban3.Name = "BannedCheck3"
		
	local ban4 = Instance.new("BoolValue", banfold)
		ban4.Name = "BannedCheck4"
		
	local banreason = Instance.new("StringValue", banfold)
		banreason.Name = "ReasonOfBan"
		
	local function SaveBan(UpdateBan)
		ban1.Value = bdtable.databan1:Get(UpdateBan)
		ban2.Value = bdtable.databan2:Get(UpdateBan)
		ban3.Value = bdtable.databan3:Get(UpdateBan)
		ban4.Value = bdtable.databan4:Get(UpdateBan)
		banreason.Value = bdtable.databanreason:Get(UpdateBan)
	end
		bdtable.databan1:OnUpdate(SaveBan)
		bdtable.databan2:OnUpdate(SaveBan)
		bdtable.databan3:OnUpdate(SaveBan)
		bdtable.databan4:OnUpdate(SaveBan)
		bdtable.databanreason:OnUpdate(SaveBan)
		
		
		local banplayertable = {}
		table.insert(banplayertable, ban1)
		table.insert(banplayertable, ban2)
		table.insert(banplayertable, ban3)
		table.insert(banplayertable, ban4)
		
		for i,banbool in pairs(banplayertable) do
			if banbool.Value ~= false then
				player:Kick("You have been permanently banned! Reason: "..banreason.Value)
			end
		end
		end
end)




An explanation and little example would be amazing thanks! :smile:

3 Likes

I don’t understand your exact goal here, can you specific your goal a little more?

1 Like

I want to change player stats outside of roblox.

2 Likes

You mean you wanna update people’s data without having them inside your game?

2 Likes

Maybe by using HTTP Service and making a table that Is relative to the site? It would need a website tho or some other source.

3 Likes

Yes exactly! Good explanation!

1 Like

You can literally update any Data at anytime. You just need a datakey that’s related to that data.

2 Likes

How would I go about thing that though?

1 Like

so uhhh, Lets see…
What’s a point of requiring module?

It’s currently 1:10 Am and i’m about go to bed so, maybe by your luck you could find someone instead of me. Good bye

1 Like

Okay, Well thank you for your help I really appreciate it.

2 Likes

Maybe by sending some sort of request to an offsite server and updating data on offsite database like mongodb or something else.

1 Like

You are using datastore2. DataStore2 is player-based, which means you need a player instance in order to read/write to data. Just use regular data stores.

2 Likes

Sorry for the bump

You can actually go inside Roblox Studio and use @Crazyman32’s DataStore Editor to change any Player’s Data without having to be In-Game to do it. It’s so simple and easy to use!

Its located here:

He has also made a tutorial on how to use it (Which is located in the description of the Plugin).

(Personally, it’s a lovely Plugin. Dont regret buying it at all :+1: )

9 Likes

I’d recommend using Firebase or using a Trello API to access the datastore from outside roblox, I mean on another site.

1 Like

I just got the plugin and watching the tutorial but I guess I’m just too new to Datastores… I used the sample save data from Roblox so I don’t even know the name and scope of my data. I am reading/writing/saving data properly from within my game, but I just don’t know the name of the database itself since I copy pasted from the Roblox sample here: Documentation - Roblox Creator Hub

Any guidance would be great

Thanks,
rich

1 Like

You could use MessagingService. But i can’t show more information because i dont know enough about you’re issue here.

So you can setup a server, have it host something like json, have a js script change the content of the json file, and in roblox you can check the json file, this is an easy way I would use other things but for you, I’d recommend this. Not really efficient but works.

1 Like

You can use fire base to do that

1 Like

This will help you using the firebase

1 Like

Sorry for bringing this back, the only plausible way I’ve found is to use google sheets as a external datastore, seeing that this one didn’t have a solution yet, I posted here.
Anyways there are a few resources on devforum for using Google Sheets as a datastore and should solve all your problems!

1 Like