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

Why doesnt it work?

Asked by 8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

I'm not sure why it doesn't work, but i think its because you cant enter ServerStorage in the client, right?

local sp = script.Parent
local ServerStorage = game:GetService('ServerStorage')
local Player = game.Players.LocalPlayer
local CoinCollect = sp:WaitForChild('CoinCollect')
local Credits = sp:WaitForChild('CreditsTxt')
local Stats = ServerStorage:WaitForChild(Player.Name..'_Stats')
Stats.Credits.Changed:connect(function()
Credits.Text = 'Credits: '..Stats:WaitForChild('Credits').Value
CoinCollect:Play()

end)

0
I believe so. Server storage is something players cannot access. Although, they can access Replicated Storage as well as Lighting. Necrorave 560 — 8y
0
Oh, ill try that thanks! UltraUnitMode 419 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

ServerStorage

ServerStorage is more ideal for objects that use large amounts of data consumption (i.e, maps, buildings, cars, etc). ServerStorage can only be accessed by a server-sided script, however you could utilize the use of the Remote Function or Remote Event objects, to make the client tell the server what to do with these objects.

ReplicatedStorage

ReplicatedStorage is another option, however I wouldn't recommend this for storing large amounts of C data (parts, models, anything physical in the game that takes up a lot of memory). The difference between ReplicatedStorage and ServerStorage, is that content in the ReplicatedStorage will be replicated to every player that joins the game immediately. As oppose to ServerStorage, where the content inside of it won't be recognized by the client until it's actually in the game instance.

Personal opinion

My personal opinion would be to use ServerStorage and remotes, just to have better and more organized memory management. At most, I'd only use ReplicatedStorage for something like tools, hats, particle effects, ect (depending on the scale of how much of these items I'd be storing).

Ad

Answer this question