Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

how would I get a specific players cash in a server script?

all the players cash values are stored in ServerStorage>folder named PlayerMoney>NumberValue named the players username.

I'm trying to make a gui that shows the players cash when the players cash value is changed. I am assuming that i'll need to use remote events for this, but don't really know how to get the players specific cash in server storage.

6 comments

0

why are they in serverstorage..................................................... just why

0

okay first, why, second, give script

0

why not?

0

he could of put it in the player to make it 21677812367812678367367x easier.

0

its not as secure under the player. exploiters can easily access it

0

oh yh

1 answer

I believe the folder name is the player's name...???

local playername = "raid6n" -- the folder name you're finding. 
local serverstorage = game.ServerStorage -- where the folders are being hold
local playerfolder = serverstorage[playername] -- finding the folder name the player's name

2 comments

1

FindFirstChild wouldn't be efficient in this case since it takes up to 6 times longer than using '.' So you would do something like serverstorage[playername]

This discussion is preserved as it was. New answers, comments, and votes are closed.