Hello there! I want to create a tool with working animations, however I have run into some issues.
On my screen, when I equip a tool, it works fine. However, when another person equips the tool, their animations appear buggy/glitchy on my side.
In my code, when the tool is equipped, I basically run this function with the names of two animations, that are played one after another, and then a third animation to act as an idle animation, that is looped and played after the second one.
function play2(anim, anim2, idleanim)
if not active then return end
local t1 = tracks[anim]
local t2 = tracks[anim2]
local t3 = tracks[idleanim]
if not t1 or not t2 or not t3 then return end
activeAnim = true
t1:Play()
t1.Stopped:Wait()
if active then
t2:Play()
else
return
end
t2.Stopped:Wait()
if active then
t3:Play()
else
return
end
current = idleanim
activeAnim = false
end
There is noticeable glitching when I switch from one animation to the next. What can I do to fix this?
I looked on the Developer Hub and have not found a solution. I have tried to fix this issue with different ways and none of them have been successful so far.
Please help and thanks for your time!