Issue with affecting all players data

this keeps changing everyones leaderstat if 1 player hits the part, i want it to only happen to the specific player that hits the part.

	local FinishDetector = workspace:WaitForChild("FinishThing"):WaitForChild("Detector")
	local hasWon = false

	FinishDetector.Touched:Connect(function(hit)
		local character = hit.Parent
		local player = game.Players:GetPlayerFromCharacter(character)

		if player and not hasWon then
			local checkpoint1 = CheckpointsFolder:FindFirstChild("1")
			if checkpoint1 then
				Wins.Value = Wins.Value + 1
				player.leaderstats:FindFirstChild("🕹️Stage").Value = 1
				hasWon = true

				player.Character:SetPrimaryPartCFrame(checkpoint1.CFrame)
				wait(5)
				hasWon = false

				myDataStore:SetAsync(player.UserId, {Stage = 1, Wins = Wins.Value, Deaths = Deaths.Value})
			end
		end
	end)

I’m pretty sure this is in PlayerAdded or connected for each player since Wins is predefined. Put this code in a seperate script or outside the event and get Wins and Deaths through the player that touched the part