ProfileService WipeProfile not working

Hey,

I want to reset my own data in my game. I added this line
ProfileStore:WipeProfileAsync(“Player_1240678162”)
but when joining the game my stats arent reset.


local ReplicatedStorage = game:GetService("ReplicatedStorage")
local HttpService = game:GetService("HttpService")

local ProfileTemplate = {
	
	Hive = { 
		[1] = {
			Lvl = 1,
			CellNum = 1,
		}
	},
	
	Bought = {},
	Codes = {
		
	["Release"] = {
		redeemed = false,
		reward = 1000,
	},
	
		["Dragons"] = {
			redeemed = false,
			reward = 1000,
		}
	
	
	},
	
	OnDepositProcess = 0,
	DepositPerSec = 2,
	
	UpgradeDepositPrice = 1,
	AddCellPrice = 3,
	HighestLevel = 1,
	Coins = 0,
	Drops = 0,
	Kills = 0,
	Droppers = 1,
	EXP = 0,
	Level = 1,
	
	Settings = {
		
	}
}

local DataManager = {}
DataManager.__index = DataManager
local self = setmetatable({}, DataManager)

local ProfileService = require(ReplicatedStorage:WaitForChild("Modules"):WaitForChild("DataService"):WaitForChild("ProfileService"))
local TycoonService = require(ReplicatedStorage.Modules:WaitForChild("TycoonSystem"):WaitForChild("TycoonService"))
local GameSettings = require(ReplicatedStorage.Modules:WaitForChild("Game"):WaitForChild("GameSettings"))

local Players = game:GetService("Players")

local ProfileStore = ProfileService.GetProfileStore(
	"Final1",
	ProfileTemplate
)



local Profiles = {} 

local function onPlayerAdded(player)
	
	local profile = ProfileStore:LoadProfileAsync("Player-" .. player.UserId)
	
	if profile ~= nil then
		
		profile:AddUserId(player.UserId)
		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
	ProfileStore:WipeProfileAsync("Player_1240678162")
end

Is this the rest of the script? If not, you forgot to connect the onPlayerAdded function with a Players.PlayerAdded event.

Also, the line containing the ProfileStore:LoadProfileAsync method uses a Hyphen (Minus) between “Player” and the player’s UserID. However, the line containing the ProfileStore:WipeProfileAsync method uses an Underscore (Low Line) instead.

LINE 68:	local profile = ProfileStore:LoadProfileAsync("Player-" .. player.UserId)
																 ^ Hyphen (Minus)
LINE 91:	ProfileStore:WipeProfileAsync("Player_1240678162")
												 ^ Underscore (Low Line)

This means that the method on line 91 is attempting to completely wipe a non-existent profile.
I recommend changing the Underscore (Low Line) to a Hyphen (Minus) instead.