Hello,I’m having problems with animations not being able to play after I just equip the tool,however;When I stop and keep walking again,Animations do work but At first place,they do bug out.How can I fix this?
If someone could help,It would be nice!
make sure your AnimationPriority
is set to Action.
There isn’t any animation playing when I equip the gun,as you can see from the video.
um there is a anim playing when u equip it
Yes It does,but that’s after I stop and start walking again.When I firstly equip the gun,It won’t play the animation.
The animation where It holds a gun doesn’t have any keyframe from lower bodyparts
is there an error in the output or smth
No,there isn’t any output error.
Can I check out the script, maybe it’s an issue with your code.
Sure.
I want to tell you before you examine the code,It’s divided to two section,one is module script which does fire a remote event to client as It’s from server side.
On Client,It meant to play the animation.
Remote.Event_032.OnClientEvent:Connect(function(TargetAnimation : Animation)
print("playing")
AnimationTable["WalkAnim"] = {}
AnimationTable.WalkAnim.Playing = true
AnimationTable.WalkAnim.Animation = TargetAnimation
for _,v in Animator:GetPlayingAnimationTracks() do
if v.Animation.AnimationId ~= AnimationTable.WalkAnim.Animation.AnimationId then
v:Stop()
end
end
local Track = Animator:LoadAnimation(AnimationTable.WalkAnim.Animation)
Track.Priority = Enum.AnimationPriority.Movement
Track:Play()
print(Track.IsPlaying)
Track.Ended:Connect(function()
print("B")
AnimationTable.WalkAnim.Playing = false
end)
end)
Client Side
NewWalk = Instance.new("Animation",Holder.Animations)
NewWalk.Name = "Walk Animation "..Player.Name
NewWalk.AnimationId = UsedInfo.Animations.Walk
Remote.Event_032:FireClient(Player,NewWalk)
Module Side
Note that in Module,there’s a thing named UsedInfo which is not really important,It just has animation ids in IT’s “Animations” table.
If there is anyone who could help,It would be nice!
wait why is the anim priority set to movement
Well I set it to priority movement,because Default roblox animate script is currently disabled at this point.
Debug it with like print("Walk animation playing")
print("Walk animation stopped")
and make sure that the holding gun animation is action1 and it doesn’t use the lower bodyparts, you said that they are not used but just make sure
alternatively you can make the walk animation to be holding the gun
I have already debugged it with print(Track.IsPlaying)
It says It’s playing but that’s weird.