Animation Stopping After 2 Seconds

Hello, I’m having trouble running my simple animation past 2 seconds. The animation triggers when I activate a ProximityPrompt. It runs fine for the first 2-2.1 seconds, then stops working. PromptTriggered also does not pick up anything past this point.

I have tried anything I can think of, but nothing seems to fix it. I created a similar animation with the exact same keyframes that had been squished down to under 2 seconds and it worked perfectly. I have no idea why it stops after specifically 2-2.1 seconds.

In case it matters, the game is in R6 and the animation priority is set to action.

Video of what happens:

As you can see, only some of the keyframes are being printed in the output by KeyframeReached.

Here is my script (local, inside fishing rod tool):

local player = game:GetService("Players").LocalPlayer
local character = player.Character

local ProximityPromptService = game:GetService("ProximityPromptService")
local PlayerModule = require(player.PlayerScripts:WaitForChild('PlayerModule'))
local controls = PlayerModule:GetControls()
local StarterGui = game:GetService("StarterGui")

if not character or not character.Parent then
	character = player.CharacterAdded:Wait()
end

local tool = script.Parent
local animation = tool:WaitForChild("Animation")
local animationTrack = character:WaitForChild("Humanoid"):LoadAnimation(animation)

local toolGrip = character.Torso:WaitForChild("ToolGrip")

local function playAnim()
	tool.Parent = character
	toolGrip.Part0 = character.Torso
	toolGrip.Part1 = tool.BodyAttach
	
	animationTrack:Play()
	controls:Disable()
	StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
end

ProximityPromptService.PromptTriggered:Connect(function(prompt,playerTriggered)
	if prompt.Parent.Parent.Name == "BubbleSpot" then
		playAnim()
	end
end)

animationTrack.KeyframeReached:Connect(function(keyFrame)
	print(keyFrame)
	if keyFrame == "EndOfCast" then
		print("Finished Cast")
		character.Torso:WaitForChild("ToolGrip").Part1 = nil
		controls:Enable()
		StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)		
		tool.Parent = game.ReplicatedStorage
	end
end)

I know there have been some recent issues with animations, I have disabled AnimationWeightedBlendFix in the workspace though this did not fix the problem.

Any help would be greatly appreciated!

1 Like