Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

what is serverstorage? how is it used?

Asked by 3 years ago

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?

3 answers

Log in to vote
1
Answered by
xEmmalyx 285 Moderation Voter
3 years ago
Edited 3 years ago

ServerStorage is a server-only container meaning it can't be accessed by LocalScripts.

ReplicatedStorage is a container that is replicated to all clients and the server; therefore, it is accessible by both Scripts and LocalScripts.

Changes made to ReplicatedStorage from a client are not replicated to the server or other clients.

Scripts will not run in the containers; however, ModuleScripts 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
Ad
Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

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...

Log in to vote
-1
Answered by 3 years ago
Edited 3 years ago

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

0
or you can just look it up in the roblox wiki or devforum bruce_matthew 4 — 3y
0
replicated storage replicates it i think and serverstorage is just storage im also confused about that bruce_matthew 4 — 3y
0
the reason there's an edit button is so you don't need to add 10 000 comments to your own post User#30567 0 — 3y
0
bruh i didn't know bruce_matthew 4 — 3y
0
why didn't anyone tell me this before bruce_matthew 4 — 3y

Answer this question