#Emote Animation stops working after reset
2 messages · Page 1 of 1 (latest)
local char = plr.Character
local isemoting = false
function playAnimation()
if isemoting == false then
local char = plr.Character
if not char then return end
local hum = char:FindFirstChildOfClass("Humanoid")
local animator = hum:FindFirstChildOfClass("Animator")
local track = nil
local anim = script.Parent.Dab
for i,v:AnimationTrack in ipairs(animator:GetPlayingAnimationTracks()) do
if v.Animation == anim then
track = v
end
end
if track == nil then
track = hum:LoadAnimation(anim)
end
track:Play()
isemoting = true
wait(1.1)
isemoting = false
track:Stop()
end
end
local button = plr.PlayerGui.ScreenGui.TextButton
button.MouseButton1Click:Connect(playAnimation)``` @slim gust try this