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

How to locate the player data?

I'm going to be simple, I'm making a datastorage script, the script is in workspace (also any other better places to put it?) and the players data (folder used) are going to be places in "ServerStorage" how would i locate it? I have think i know how to locate it, please tell me if im wrong

--this is in a localscript in starterpack
plr = game.Players.LocalPlayer
game:WaitForChild("ServerStorage"):FindFirstChild(plr)
--Am I doing it right?

1 answer

✓ Accepted answer

game:WaitForChild("ServerStorage"):FindFirstChild(plr) would be incorrect.

game:GetService("ServerStorage"):FindFirstChild(plr.Name) would be correct, as you are getting the service, ServerStorage, and then looking for the player's name, rather than the player themself.

I would recommend doing something like player.Name.."'s folder" as the name, as it's easier to read whenever you're having an error.

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