#issue - ProfileService - works fine on ServerScriptService but returns nil on console

5 messages · Page 1 of 1 (latest)

queen dirge
#
local Players = game:GetService("Players")
local ServerScriptService = game:GetService("ServerScriptService")
local PlayerData = require(ServerScriptService.Modules.PlayerData.Manager)
print("Printing Player Data")
local PlayerId = 1804635077 -- me
local player = Players:GetPlayerByUserId(PlayerId)
local profile = PlayerData.Profiles[player]
print("printing profile from profile var")
print(profile)
#

this is the ServerScriptService script print statement

#

and this latter screenshot is the output from the console script that was run on the server:

proper bobcat
#

I don't understand