[SOLVED] R15 animations wont play and R6 will

Hello, so I was making a custom emotes system which supports R6 and R15. First before adding R6 support R15 animations worked, now it doesn’t. Can anyone help?

Code:

local bestmates1 = script.BestMates1

local remote = script.Parent.RemoteEvent

local debounce = false

remote.OnServerEvent:Connect(function(plr,mode)
	if plr.Character.Humanoid.RigType == Enum.RigType.R15 then
		local bestmatesr15 = plr.Character.Humanoid.Animator:LoadAnimation(script.BestMatesR15)
		local jubislider15 = plr.Character.Humanoid.Animator:LoadAnimation(script.JubiSlideR15)
		bestmatesr15.Priority = Enum.AnimationPriority.Action
		jubislider15.Priority = Enum.AnimationPriority.Action
		if mode == "BestMates" then
			if not debounce then
				debounce = true
				if bestmatesr15 then
					bestmatesr15:Play()
					bestmates1:Play()
					wait(16.338)
					bestmatesr15:Stop()
					bestmates1:Stop()
				end
				debounce = false
			end
		elseif mode == "JubiSlide" then
			if not debounce then
				debounce = true
				if jubislider15 then
					jubislider15:Play()
					wait(16.4)
					jubislider15:Stop()
				end
				debounce = false
			end
		end
	else
		local bestmatesr6 = plr.Character.Humanoid.Animator:LoadAnimation(script.BestMatesR6)
		local jubislider6 = plr.Character.Humanoid.Animator:LoadAnimation(script.JubiSlideR6)
		if mode == "BestMates" then
			if not debounce then
				debounce = true
					bestmatesr6:Play()
					bestmates1:Play()
					wait(16.338)
					bestmatesr6:Stop()
					bestmates1:Stop()
				debounce = false
			end
		elseif mode == "JubiSlide" then
			if not debounce then
				debounce = true
					jubislider6:Play()
					wait(16.4)
					jubislider6:Stop()
				debounce = false
			end
		end
	end
end)

It would really help if someone could fix it!

1 Like

alr i found the solution, i used Enum.RigType to check if the player is r15. i guess thats unstable, then i tried to check by using a limb that r6 doesnt have and it worked