#Best way to store player data?

96 messages · Page 1 of 1 (latest)

still rover
#

in short: i wanna know the best way of associating data to a player, is it one of the options i've talked about or is there something else i should check out?

gentle mirage
#

The best way for who?

#

You have to choose the best way for you. Whatever you feel is easier to implement.

#

I personally use attributes or tables.

still rover
#

I have some preferences here but I also wanna know if I'm missing out on anything that could be way better for me

gentle mirage
#

I don't think there's anything else or any better.

#

Let's wait for someone else, though.

still rover
#

yeah, I wanna see more points of view

pastel storm
#

using profileservice, but not replica, replica is not needed, also update it to profilestore which is more updated, with that and making that when a profile gets created you create value for example of the leaderstats and get the value from his profile for me is personally the best way and the way i use in my projects

#

i said use like u need to, but no, as thermo said, use ur preference, also knowing the limits of each one and what you can do and cant do with each, but personally and about big projects talking profilestore for me is perfect

still rover
pastel storm
#

is just a table

still rover
# pastel storm is just a table

I really don't wanna be doing Profile.Data every time I wanna access it, and how do you per example call for the profiles from other scripts

#

or the client

pastel storm
#

why dont you like doing that? lol

#

and is just requiring one module

#

module is basically the life of games

gilded mist
#

modules are amazing

still rover
#

like what's the whole code i'd have to write in order to get a player's profile in another script

still rover
pastel storm
#

for example, this is how i get it

still rover
pastel storm
#

local FirstProfileStore = require(SS.ProfileStores.FirstProfileStore)

require the store

and then for example on a remote event call

local FirstProfile = FirstProfileStore:GetProfile(Player);
#

there's no secret xd

pastel storm
#

its not useless tho

still rover
#

and what about the client

pastel storm
#

i dont really understand wdym but alr

#

when you gonna put the profile on the information of profilestore you can create the values you want

still rover
still rover
still rover
pastel storm
#

if Player:IsDescendantOf(Players) then

    Leaderstats:Create(Player, FirstProfile)
    Profiles[Player] = FirstProfile

here i create all the needed for the player not only leaderstats, such as extra values as currencies, maybe extra things etc etc

gilded mist
pastel storm
#
-- Create the stats folder & all the stats in it.
function CreateStats(FirstProfile: Types.FirstProfile, FirstProfileData: Folder): ()
    
    local StatsFolder = Instance.new( "Folder" );
    StatsFolder.Name = "Stats";
    StatsFolder.Parent = FirstProfileData;
    
    for StatName, StatValue in FirstProfile.Data.Stats do
        
        local NewStatValue = Instance.new("StringValue");
        NewStatValue.Value = StatValue;
        NewStatValue.Name = StatName;
        NewStatValue.Parent = StatsFolder;
        
    end;
    
end;
still rover
gilded mist
pastel storm
#

for example here i create the values of all the stats so the player can look up how much coins u got in a stringvalue.

still rover
#

how do i get my player's coins and update it when the coins change

gilded mist
#

bindablefunctions

pastel storm
#

bro read what im writing

still rover
onyx hillBOT
#

studio** You are now Level 3! **studio

pastel storm
#

because some data i js dont create on values

still rover
pastel storm
#

detecting changes on the values

#

replica is shit

still rover
#

well that defeats the whole purpose of profilestore doesnt it

pastel storm
#

nope

still rover
#

you're just doing a mixture of the values thing i talked about and profilestore

pastel storm
#

idk what do u think the purpose of profilestore is

still rover
#

i only really use it for it's datastore stuff

pastel storm
#

profilestore for me is the best option, only using values for me its not good

#

and i cant really tell you rn ALL the advantages you should test it out

#

in a baseplate for example

still rover
#

the advantage of profilestore being so useless i gotta go back to regular values because i cant pick up a change of values??

#

or find any info on the client reliantly

pastel storm
#

xd if that is your biggest problem u r fucked on scripting ngl

#

or have low experience on it

still rover
#

yk i think those 2 are pretty important

pastel storm
#

js keep on and keep testing more options, if you're not experienced on roblox studio js dont make a big project

#

cuz you're going to lead on learning in the process and want to change the whole game

still rover
#

you arent really explaining anything im asking about you're just personally attacking me

pastel storm
#

im explaining but you seem to dont understand and finding an "issue" where it isnt

still rover
#

you're just being really condecending and just assuming i have no experience

#

im trying to find solutions not being attacked by enormous egos

pastel storm
#

i cant say real things cuz you get attacked

#

if that's your biggest problem is a reality that right now is not your objective to make a full game

#

first learn

#

if u are new

still rover
#

im not new

pastel storm
#

or if u are not learn about this camp

gilded mist
#

Ye hes not tryna be mean

still rover
#

im just simply trying to explore better avenues for player data

gilded mist
#

if u go into big projects now after 1 month ur gonna see how bad ur script has

pastel storm
#

and im trying to explain you why profilestore and you see a issue because i create values?

still rover
#

I'm simply saying that profilestore is kind of useless if I can't get it on the client reliantly and have to depend on instance values to detect changes

pastel storm
#

and what do you want

still rover
#

maybe something like profilestore where I can work with values as if it was a table while also being able to pick up changes of values and be able to also get this data on the client

pastel storm
#

and how i am saying is how you can do it

#

creating values doesnt make it useless

still rover
#

well that's my question and that's why i made this post

pastel storm
#

and if you want go ahead with replicacontroller its ok

still rover
pastel storm
#

but for me its really bad

still rover
#

it is bad, it's too much of a hassle for it to replicate right

#

and for the documentation i've read it's just bad

pastel storm
#

so i suggest you creating a template game

#

where u use this

still rover
#

i've used profilestore before