I have a looped animation named Lie with only 1 keyframe wich is at 0 seconds, the only animated part is the torso and the priority is Action.
I found this and I tried these things but it did not work: https://scriptinghelpers.org/questions/13447/properly-stop-animations
The Stop() function doesen't seem to work.
The animation starts, all prints work right and it gives no error.
I tried starting a new animation wich is blank and has core priority, but it did not work.
Animation ID: c3b2824fa4becf2c6ee2f20972de6604
Mouse = game.Players.LocalPlayer:GetMouse()
Prone = false
Player = game.Players.LocalPlayer.Character
Mouse.KeyUp:connect(function(Key)
print("Key "..Key.." down.")
if Key == "c" then
print("Prone key down.")
local Animation = Player.Humanoid:LoadAnimation(script.Lie)
if Prone == false then
print("Prone is false.")
Prone = true
Animation:Play()
Player.Humanoid.CameraOffset = Vector3.new(0,-4,-1.5)
else
print("Prone is true.")
Animation:Stop()
--Animation = Player.Humanoid:LoadAnimation(script.Animation)
--Animation:Play()
Player.Humanoid.CameraOffset = Vector3.new(0,0,0)
Prone = false
end
end
end)

1 comment
It worked! Thank you so much, I feel like I owe you now. I also had to add a bit that waited for the script to be in a Backpack.