You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want a specific frame to be playing over and over again or a way to stop the user from returning to its original idle animation. -
What is the issue? Include screenshots / videos if possible!
Every time the animation ends it returns back to -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Solutions not that clear.
local CrouchFunction = script.Function
local RS = game:GetService("ReplicatedStorage")
local CrouchAnimations = RS.Animations
local Players = game:GetService("Players")
local lp = Players.LocalPlayer
local char = lp.Character
local hum = char:WaitForChild("Humanoid")
local animator = hum:WaitForChild("Animator")
local debounce = false
CrouchFunction.OnInvoke = function(Walk)
print(Walk)
if Walk == "Idle" then
local IdleTrack = animator:LoadAnimation(CrouchAnimations.CrouchIdle)
IdleTrack.Looped = false
IdleTrack.Priority = "Action"
IdleTrack:Play()
IdleTrack:GetMarkerReachedSignal("EventName"):Connect(function(param)
warn(param)
IdleTrack:Stop()
end)
end
end