So for DataStores I do not understand why people always insist that I store them on the server instead of somewhere in the ReplicatedStorage. The ReplicatedStorage is also the server and with Filtering Enabled only the server has access to them if it is the server that is going to do something with them
Meaning if someone changes their data on the client it wont replicate to the server?
So why does everyone insist that I place all my data on the serverstorage where the client cannot access them using localscripts to show things like GUI
it is more convenient
FilteringEnabled is a feature that makes it so the client cannot replicate to the server. The server just won't accept.
Let's say you have a gun that is worth 350,000 Cash and an exploiter has 2,500 Cash. He makes it so his cash is 350,000. But then the exploiter still can't buy the item. Why?
Even your script is correct (unless it is a LocalScript which I assume that it is possible exploiting the cash), the server will not read it as 350,000. It reads it as 2,500. So now, the exploiter has to do it the real way.
And ReplicatedStorage can be accessed by the Client and the Server, so do not put anything that you don't want the client to see.
ServerStorage is a great place to put important stuff like Admin GUIs, or whatever, it's because only the Server can access it, not the Client.
If you want the client to access ServerStorage (like to do something to an Instance in ServerStorage), use a RemoteEvent to achieve this.
Here's an example on how to use RemoteEvents:
LocalScript:
local LolEvent = game.ReplicatedStorage.DancingEvent -- lol game.Players.PlayerAdded:Connect(function() LolEvent:FireServer() end)
ServerScript:
local LolEvent = game.ReplicatedStorage.DancingEvent local DancingHub = game.ServerStorage.DancingHub LolEvent.OnServerEvent:Connect(function() DancingHub.Parent = Workspace end)
And there you go! It should bring an instance called 'DancingHub' to Workspace every time someone joins. Be aware that this script only works once.
I hope I made you understand why people choose to keep data in ServerStorage. Exploiters only can make LocalScripts.
Have a nice day! :D