I wanna know what ServerStorage is and how I would access an object in there. It's not replicated, so how do I access it? Also, how is ServerStorage different from ReplicatedStorage?
ServerStorage
is a server-only container meaning it can't be accessed by LocalScript
s.
ReplicatedStorage
is a container that is replicated to all clients and the server; therefore, it is accessible by both Script
s and LocalScript
s.
Changes made to ReplicatedStorage
from a client are not replicated to the server or other clients.
Script
s will not run in the containers; however, ModuleScript
s are accessible and will work.
It is recommended to store things on ServerStorage
rather than ReplicatedStorage
if it doesn't need to be replicated to the clients in order to reduce traffic.
To access them in a script it is recommended to use :GetService()
This is still accessible without :GetService()
game:GetService("ServerStorage") game:GetService("ReplicatedStorage")
Things that are often kept in ReplicatedStorage
are Remote Events / Functions
and anything else the client would need access to.
Often you'd want to clone things and then move the clone
Example of accessing a ServerStorage object.
local dog = game:GetService("ServerStorage").Dog:Clone() dog.Parent = workspace
ServerStorage
is used for keeping stuff in a storage but still in the game so its not visible to anyone. This is very useful for games like tycoons. You can keep stuff in there and then use scripts to then bring it in workspace later. I recommend using it in tycoon games. Replicated storage is mostly used for Remote Events. ServerStorage is used for models and parts and folders and things like that. To access it in a script you simply write this.
local ServerStorage = game:GetService("ServerStorage")
to put something in the storage just type this.
--im using something named part for an example local ServerStorage = game:GetService("ServerStorage") local part = game.Workspace.Part part.Parent = ServerStorage --this is how to put something out of the storage part.Parent = game.Workspace --or you can move it somewhere else but im using workspace
tbh @xEmmalyx explains the contrasts of the two storages better than i do lol...
server storage is basically a storage for the things in your game where you put the tools,models, or folders in and you can use it for the game like raining bombs the bomb model is in the server storage ( but thats just what i do ) and i create a script in server script storage and make a random bomb spawner. and the ammo and health potion thing in arsenal i think they put those in server storage and they clone them and put them in the players position when they die or like in world//0 the mobs drop items and coins local part = PArt:Closne() part.Parent = game.workspace this is how to put it in workspace and part.Positon = where you want to position it part.Brickcolor or part.Color = Enum.BrickColor or if you put color then (number,number,number) the color you want it to be and part.Cancollide = true or false this is self explanatory and part.Transparency = number also self explanatory and and part.Reflectance = number i dont really use this but maybe you can try and use this for glass part.Mterial = Enum.Material. the material or you can just look it up in the roblox wiki or devforum