can you access server storage from local script? I want to make a cutscene where a NPC appears, but i dont know where to put the NPC before transferting them to the workspace, and my cutscenes are done from local scripts.
No, you can not access Server Storage from the client. If you want to store something not in workspace but want the client to have access to it you can put it in Replicated Storage.
The client cannot access ServerStorage or ServerScriptService.
(Server)Storage, (Server)ScriptService
.
Why is this not allowed does it have something to do with exploitation?
Yes. A very long time ago, changes made by the client instantly replicated to the server. This means that if a player manipulates anything in the game through their client, those changes get replicated to everybody else. So for example, an exploiter deletes a game’s map, that map gets deleted for everyone else.
A solution for this by Roblox is to not allow client changes to replicate to the server. This means that now, if an exploiter were to manipulate the game and say delete the map, those changes are contained within the exploiter’s client - meaning that the map is only deleted for the player that deleted it, and for everybody else the map is still there.
LocalScripts are scripts that run on the client, so by nature, if you try to do anything on the LocalScript that require server access, the server blocks them as a form of preventing exploiters.
Hmm then how could i protect replicated storage i heard that it can be exploited
hmmm if i could protect replicated storage what about remote events couldnt they still do anything with remote events if not secured? or remote functions
Exploiters can spam remotes, but with sanity checks (on the server) and no power given to the client, attempts are futile.
Technically the client can access any service, but on the client, anything related to the server is empty because they can’t be viewed.
wdym by sanity checks? like using a if statement?
Security checks basically, so If statements too.