Hi!
I am not sure if this is even possible, but I want to try it anyways. I have a rig that is R15, and I want to play emotes on. I pulled the humanoid description from my player, and parented it to the humanoid. This is a rig in workspace, so I converted the default Roblox animate script into a server side script by removing the chat emote hook system, and porting all the code and parts into a server script like so:
(This was not required but I feel it is important to mention anyways.)
Then, I load and try playing random emotes from the HumanoidDescription with this:
local humanoidDescription = humanoid:FindFirstChildOfClass("HumanoidDescription")
local emotes = humanoidDescription:GetEmotes()
if humanoidDescription then
local emoteKeys = {}
for key, _ in pairs(emotes) do
table.insert(emoteKeys, key)
end
local count = #emoteKeys
if count > 0 then
local randomEmoteKey = emoteKeys[math.random(1, count)]
humanoid:PlayEmote(randomEmoteKey)
end
end
Since an emote table is returned with the emote name as the table index, I peel the emote name data off and then calling humanoid:PlayEmote() takes a random name as the input.
However, doing so causes this error:
So I tried passing the humanoid and emote name to the client via a RemoteBindableEvent and having the client play it, but now I get this error:
So now the question is, how do I play the emotes on a rig?
When I load the emote onto an animation track directly with the asset ID pulled from the emote returned from the humanoidDescription:GetEmotes(), I get an error similar to what is found when loading an animation track not owned by you / a group, even though the animation is by Roblox themselves.
Am I doing something wrong? What can I do to play Roblox emotes on a rig in workspace?
(P.S yes, my rig is R15)