function EmoteManager.setEmoteIsLockedForPlayer(Q,m,E,M)if not Q.playerOwnedEmotes[m.UserId]then local E=nil while E~=m.UserId do E=Q.updatedPlayerEmotes.Event:Wait()end end local J=Q.playerEmoteConfig[m.UserId]local L=J[E]if L then local y=Cryo.Dictionary.join(J,{[E]=Cryo.Dictionary.join(L,{isLocked=M})})Q.playerEmoteConfig[m.UserId]=y Q.remotes.sendUpdatedEmotes:FireClient(m,y)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",E))end end
--[[
	Sets the locked status of the given emote for the specified player. The
	player will be updated of this change via a RemoteEvent.

	Parameters:
	- player - The Player whose emote lock status will be changed
	- emoteName - The name of the emote that will have its lock status changed
	- isLocked - The lock status to change to
]]
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
