function EmoteManager.setEmoteIsLockedForPlayer(R,Y,u,d)if not R.playerOwnedEmotes[Y.UserId]then local u=nil while u~=Y.UserId do u=R.updatedPlayerEmotes.Event:Wait()end end local T=R.playerEmoteConfig[Y.UserId]local n=T[u]if n then local P=Cryo.Dictionary.join(T,{[u]=Cryo.Dictionary.join(n,{isLocked=d})})R.playerEmoteConfig[Y.UserId]=P R.remotes.sendUpdatedEmotes:FireClient(Y,P)else error(string.format("\084\104\101 \101\109\111\116\101 \119\105\116\104 \116\104\101 \110\097\109\101 \037\115 \100\111\101\115 \110\111\116 \101\120\105\115\116",u))end end

function EmoteManager:setEmoteIsLockedForPlayer(player, emoteName, isLocked)
	-- Wait for all setup for the player to complete before changing the locked
	-- status of an emote
	if not self.playerOwnedEmotes[player.UserId] then
		local updatedPlayerId = nil
		while updatedPlayerId ~= player.UserId do
			updatedPlayerId = self.updatedPlayerEmotes.Event:Wait()
		end
	end

	local allPlayerEmotes = self.playerEmoteConfig[player.UserId]

	local emote = allPlayerEmotes[emoteName]
	if emote then
		local newEmotes = Cryo.Dictionary.join(allPlayerEmotes, {
			[emoteName] = Cryo.Dictionary.join(emote, {
				isLocked = isLocked,
			}),
		})

		self.playerEmoteConfig[player.UserId] = newEmotes
		self.remotes.sendUpdatedEmotes:FireClient(player, newEmotes)
	else
		error(string.format("The emote with the name %s does not exist", emoteName))
	end
end
