Ive been using profile service for my project and i’ve enabled team create because im working with someone. But profile service keeps giving me this error when I press the blue Play button (Not team test):
509: Data Store operations blocked while running on a Personal RCC to prevent possible data corruption
On team test, the player data becomes nil. Does anyone know why this is happening?
Have you enabled DataStore access in Studio?
Can you try accessing the DataStore in a separate script? what about accessing a different DataStore?
Have you tried using a different account or device?
The error message you are encountering, “509: Data Store operations blocked while running on a Personal RCC to prevent possible data corruption,” indicates that Data Store operations are being blocked when running on a Personal RCC (Roblox Cloud Compute). This is done to prevent potential data corruption.
To resolve this issue, you can try a few troubleshooting steps:
Ensure that you and your collaborator are both using the latest version of Roblox Studio and have the necessary permissions to access and modify Data Store data.
Make sure that you are not running any conflicting scripts or plugins that may be interfering with the Data Store operations.
Check if the issue persists when running the game outside of Team Create mode. If it only occurs in Team Create, it might be worth contacting Roblox Support for further assistance.
Verify that the Data Store service is functioning correctly by checking the Roblox Developer Hub or the Roblox Status page for any ongoing issues or maintenance.
Regarding the issue with player data becoming nil on Team Test, it’s challenging to pinpoint the exact cause without more information about your project and code. However, you can try debugging by checking if the player data is being properly initialized and saved during gameplay.
If you are unable to resolve the issue, it is recommended to seek help from the Roblox Developer Forum or contact Roblox Support for more specific guidance related to your project’s requirements.
local ProfileService = require(game:GetService("ServerScriptService").Essentials.ProfileService)
local Players = game:GetService("Players")
local ProfileStore = ProfileService.GetProfileStore(
"PlayerData",
{
LastPosition = {X = 0, Y = 0, Z = 0},
Inventory = {},
Pets = {},
}
)
local Profiles = {}
local function onPlayerAdded(player)
local profile = ProfileStore:LoadProfileAsync("Player_"..player.UserId,"ForceLoad")
if profile then
profile:Reconcile()
profile:ListenToRelease(function()
Profiles[player] = nil
player:Kick()
end)
if player:IsDescendantOf(Players) then
Profiles[player] = profile
else
profile:Release()
end
else
player:Kick()
end
end
local function onPlayerRemoving(player)
local profile = Profiles[player]
if profile then
profile:Release()
end
end
for _, player in Players:GetPlayers() do
task.spawn(onPlayerAdded,player)
end
Players.PlayerAdded:Connect(onPlayerAdded)
Players.PlayerRemoving:Connect(onPlayerRemoving)
local PlayerDataManager = {}
function PlayerDataManager.Get(player)
local profile = Profiles[player]
if profile then
return profile.Data
end
end
function PlayerDataManager.AddPet(player, pet, nickname, level, gender, reciveNote)
local data = PlayerDataManager.Get(player)
print(data)
print(pet.Name)
local newPet = {
Pet = pet.Name,
Nickname = tostring(nickname),
Level = level,
Gender = tostring(gender),
DateObtained = DateTime.now():FormatLocalTime("LL", "en_us"),
Note = tostring(reciveNote)
}
table.insert(data.Pet, newPet)
end
return PlayerDataManager
In Roblox, the ProfileService module requires specific permissions to function properly. Here are the necessary permissions for the ProfileService module:
Read/Write Access to the DataStore: The ProfileService module needs read and write access to a DataStore in order to save and load player profiles. Make sure the DataStore is properly configured and that the module has the necessary permissions to access it.
Player DataStore Permissions: The player’s DataStore must have read and write permissions for the game to save and load their profile data. You can set these permissions in the Roblox DataStore service settings.
Server Script Access: The ProfileService module should be placed in a server-side script to properly manage player profiles. Ensure that the script containing the ProfileService module is running on the server and has the necessary permissions to access player data.
By ensuring these permissions are correctly set up, you should be able to use the ProfileService module without any issues.
Fills in missing values, so if you add something to your template it’ll automatically fill in player’s missing data value when they join. This lets you update and add more values.
I don’t fully know what happens there. I’m pretty sure profileservice uses the template for data names and stuff, just remove it from the template and you should be fine.