I have an script call an animation once it receives a signal from the client, but the animation is running twice when the signal is being sent and received only once, and nothing that comes after the animation gets called twice.
elseif what == "PlayIdleComboOver" then
print("bla2")
for i, v in pairs(character.Humanoid.Animator:GetPlayingAnimationTracks()) do
v:Stop()
end
wait(1)
character.Humanoid:WaitForChild("Animator"):LoadAnimation(animationsmodule[itemsmodule[currentweapon].Attributes.Type][wieldstate].Idle):Play()
print("test")
This is the output:
14:59:55.696 bla2 - Server - Combat:86
14:59:56.714 GreatswordIdle1H (x2) - Server - Combat:50
14:59:56.714 test - Server - Combat:95
Notice how both bla2 and test only get outputted once.
The module points towards whatever the player is using. The animations works, the problem is its called twice in this single line, where the entire function only runs once.
From the code given all I can think of is that the inbuilt animator scripts are independently running the anim when loaded.
You could try separating the load and play and running a check along the lines of if not anim.playing then etc