Issue with set up rig into viewport frame datastoreservice

Hi, the problem is that it has to create a players skin on the new cloned rig and place it in the viewport for each player that is in the datastore (of course).

I spent a lot of time trying to fix this and I got it. I don’t know what to do, like using one event because it causes a lot of problems, like when I click on it something appears that shouldn’t be there. I’m just tired of this and my mind is not working:

so some part of client and server side scripts*

client

local function showPlayerData(dataType)
	cleanData()
	
	for _, data in ipairs(dataType) do
		local newDataFrame = template:Clone()
		newDataFrame.Parent = scrollingFrame
		newDataFrame.Visible = true
		
		newDataFrame.NumberValue.Text = data.rankIndex
		newDataFrame.PlayerNameLabel.Text = data.playerUsername or "Unknown"
			
		coloredRankIndex(newDataFrame.NumberValue, data.rankIndex)
			
		if currentCheck == "time" then
			newDataFrame.ValueLabel.Text = formattedTime(data.dataValue)
		else
			newDataFrame.ValueLabel.Text = data.dataValue
		end
		
		applyEvent:FireServer(data.userId)	
		
		task.spawn(function()
			applyEvent2.OnClientEvent:Connect(function(player, clone)
			clone.Parent = newDataFrame.ViewportFrame
			end)
		end)	
	end
end

server

applyEvent.OnServerEvent:Connect(function(player, userID)
	local success, description = pcall(function()
		return game.Players:GetHumanoidDescriptionFromUserIdAsync(userID)
	end)
	if success and description then
		local playerRig = game:GetService("ReplicatedStorage"):WaitForChild("PlayerRig")
		local clone = playerRig:Clone()
		clone.Parent = workspace
		
		local humanoid = clone:FindFirstChildOfClass("Humanoid")
		humanoid:ApplyDescriptionAsync(description)	

		task.wait(1)
		applyEvent2:FireClient(clone)
	end
end)

I hope someone can help me. :frowning: