local player = game:GetService("Players").LocalPlayer
local char = player.Character
repeat wait()
character = player.Character
until character
local humanoid = char.Humanoid
local mouse = player:GetMouse()
local Frame = script.Parent.Frame
Frame.Visible = false
local animid = Instance.new("Animation")
animid.AnimationId = "rbxassetid://5607811807"
local idle = humanoid:LoadAnimation(animid)
idle.Looped = true
local testBtn = Frame.Menu.ScrollingFrame.Test
local emotesList = {idle}
for i, emote in pairs (emotesList) do
emote.Priority = 2
end
humanoid.Running:connect(function()
for i, track in pairs (emotesList) do
track:Stop()
end
end)
mouse.KeyDown:connect(function(key)
if key:lower() == "e" then
if Frame.Visible then
Frame.Visible = false
else
Frame.Visible = true
end
end
end)
testBtn.MouseButton1Down:connect(function()
local Running if humanoid.MoveDirection ~= Vector3.new(0,0,0) then
else
playAnim(idle)
end
end)
function playAnim(container1)
Frame.Visible = false
container1:Play()
end
So I'm having this weird problem. I'm trying to make an emote GUI, but when I start playing an animation, sometimes it stops for no reason. Here's my code:
Here's some proof: https://i.imgur.com/WCCMyWA.gifv

5 comments
This won't fix your issue but please use Connect instead of connect as the lowercase version is deprecated
Ok, thank you.
What is your animation priority?
I'm setting the animation priority to 2 in line 20
instead of emote.Priority = 2 try emote.Priority = enum.AnimationPriority.Action