I am trying to make an animation for my weapon. This is a Hold position and as soon as the player equips the weapon, an animation should play.
Well, everything works fine but the problem is that the animation goes back the default animation as soon as I equip the weapon.
As you can see, as soon as I equip the weapon, the animation resets.
I want it so that the pistol stays in the same position (The Hold Position).
For your reference, I am following this tutorial from the DevForum:
This is my local script:
local Player = game.Players.LocalPlayer local char = Player.Character or Player.CharacterAdded:Wait() local WeaponTool = script.Parent local Humanoid = char:WaitForChild("Humanoid") local Animation = script.Parent.Hold local AnimationTrack = Humanoid:LoadAnimation(Animation) script.Parent.Equipped:Connect(function() game.ReplicatedStorage.RemoteEvents.ConnectM6D:FireServer(WeaponTool.BodyAttach) char.UpperTorso.ToolGrip.Part0 = char.UpperTorso char.UpperTorso.ToolGrip.Part1 = WeaponTool.BodyAttach AnimationTrack:Play() if AnimationTrack.IsPlaying then print("Playing animation track") end end) WeaponTool.Unequipped:Connect(function() game.ReplicatedStorage.RemoteEvents.DisconnectM6D:FireServer() AnimationTrack:Stop() end)
It does print “Playing Animation Track”.
Is there any way to stop the animation from going back to the original position?
And another problem is that as you can see that the weapon comes from the torso. That doesn’t look good. Is there any way we can fix this?
Thanks for any help