How do I use ProfileService properly?

I am currently making an Character Creation system, and it seems that it doesn’t want to modify the datastore? I am modifying it thru an server script. When I print the datastore before changes, it looks like this.
Everything is there, but it also has this error

And in the script it says
I am quite confused on how to use this, could anyone help please?

So basically ProfileCache is a table and while looping you are getting all the items from thr table and printing them. You would have to do



My structure for ProfileService is:
{Data} =
{CharacterData} = {Age, Hair etc}

And it says that character data doesn’t exist, I already know how to change it, but it doesn’t seem to work.

maybe for you you might not need to index Data since the Data part is what doesnt exist so just check if u need to index with Data then CharacterData or just ProfileCache.CharacterData

I have tried that aswell, but nothing just seems to work? I got banned from roblox for a day, and I’ll try again without putting .Data

1 Like

after the loop does profile cache still exist?

1 Like

why wouldn’t it, and i quite dont understand which loop

Show us the whole so we can understand it better.

1 Like

This has nothing to do with the structure. Read carefully what i said on my previous reply. If it does not help try printing ProfileCache outside the for loop and show us what it prints.

This is exactly what it prints?

I will in a few hours, but exactly what you want to see?

No, you printed it in a for loop. Im asking you to print it out of it.

1 Like

Ok, I will in a few hours when I get unbanned.

Hello, I got unbanned and I printed it outside of a loop, as I expected it prints the same thing.

1 Like

The whole code that creates the error

1 Like

I figured it out. I wasn’t checking the player’s data properly. I was requiring the module without [player] part, and I also put .Value for the characterdata which wasn’t supposed to be there.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.