I want to make it so the animation wont be interrupted by itself or player movement. What do I do?
Animation Script
UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:Connect(function(input, gameProccesedEvent)
if input.KeyCode == Enum.KeyCode.R then
local Animation = script.Animation
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Humanoid = Character.humanoid
local AnimationTrack = Humanoid:LoadAnimation(Animation)
AnimationTrack:Play()
Ok so since the animation has already been exported you’ll have to export it again but before exporting,on the animation editor click the three dots where the exporting button is but instead of clicking it click on set animation priority first and it’ll open a new tab,click on “Action” and then export it.
Now your animation wont be stopped by movement animations
PlayingAnim=false
--considering the animation track is defined as Animation
Animation.Stopped:Connect(function()
PlayingAnim=false
end)
function PlayAnimation()
if PlayingAnim then return end
Animation:Play()
PlayingAnim=true
end