So basically, i have a problem, im making a game that i need a script to check if the humanoid is running or not, i specifically want it to run the animation, which perfectly does fine. But theres a thing, when you move around like your orientation changes, the animation replays and looks like its cutted, hope i can get some help.
local Anim = script.Parent.AnimControl:LoadAnimation(script.Walk)
script.Parent.Parent.Humanoid.Running:Connect(function(speed)
if speed > 0 then
Anim:Play();
else
Anim:Stop();
end
end)
However that would be a nice option, but its a separate model from the player, so i want to kinda make like when you move, a part animation is played. Not the player itself. but thanks for the contribution.
Not sure exactly what this means and if you can explain better I may be able to help more- but an alternative to monitoring the running property is to check velocity.
To add on, if you want it to detect it constantly you can do this:
Humanoid:GetPropertyChangedSignal("MoveDirection"):Connect(function()
if Humanoid.MoveDirection.Magnitude > 0 then
if Anim.IsPlaying == true then return end
Anim:Play();
else
Anim:Stop();
end
end)
(I have a question, are you making a JJBA game? If so thats cool. If not it is still cool.)