When calling PlayerDataStore to store information (like stats for an rpg and whatnot), do you have to use a script? Many sites I looked up said it won't work otherwise. If so, how do you get the player to use in "PlayerDataStore:GetSaveData(player)" in the regular script? If you can use a LocalScript, how do I remove this error?
Error: "PlayerDataStore requested on the client, is a server-only module."

5 comments
Error is saying that PlayerDataStore can't be requested on the client (local script), and can only be requested on a server-only module
Never tried PlayerDataStore, but attempt to use a script.
I don't know how I can get the player from a regular script. Is there any straight forward way? Thanks for replying.
game.Players.PlayerAdded:Connect(function(Player) --do stuff end)
So can I make that a variable instead of a function? Do I just do something like "player = Player" in the function then end it and I can use the variable "player"?