I need places in the game that only the local player can access.
It can't be my backpack
,lighting
nor workspace.CurrentCamera
.
Also, scripts need to be able to work there.
Any ideas?
FilteringEnabled is your godsend.
Essentially what FilteringEnabled does is prevent the Client (a player) from directly editing (for the most part) the Server by filtering replication. Replication is basically where a change is replicated to all clients. In your case, an example of replication would be where if a Client goes ahead and steals someone else's BindableEvents. If FilteringEnabled is enabled, then if a Client tries to steal someone's BindableEvents it will be stolen on their Roblox instance only, and no other Clients will be affected by the change!
You can achieve this change by setting workspace.FilteringEnabled to true in Studio.
However, note that FilteringEnabled does not selectively filter; it will filter most changes. This means that you may need to edit your code to allow replicating to happen. Unfortuantely, I don't really have the time or space to really outline a great approach towards doing what you need to do (especially since you don't have much information here), so I will leave this nice little introductory-and-for-beginners sort of thread I wrote on the Roblox forums earlier.
Check this thread out if you want to learn more about FilteringEnabled.
Anywhere only on the Client becomes private to that Client (i.e. LocalScripts) when workspace.FilteringEnabled
is set to true
, but other than that there's nothing you can really do to hide stuff stored in normally replicated places.
It seems to me that you're trying to hide stuff from other people in a Script Builder. If you can set FilteringEnabled to true from a Script, you can use your LocalScripts indiscriminately.