Any idea why the animation doesn't signal markers?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want the animation to signal when it reaches the hitbox marker.

  2. What is the issue? Include screenshots / videos if possible!
    It doesn’t do anything.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I’ve looked on multiple posts, they were all for other solutions and problems in the code.

Event.OnServerEvent:Connect(function(player)
	local Character = player.Character
	local Humanoid = Character:FindFirstChildOfClass("Humanoid")
	Humanoid.AutoRotate = false
	Humanoid.WalkSpeed = 0
	Humanoid.JumpPower = 0
	Humanoid.JumpHeight = 0
	local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
	local Animator = Humanoid:FindFirstChildOfClass("Animator")
	local Animation1 = Instance.new("Animation")
	Animation1.AnimationId = "rbxassetid://"..AnimationIdMiss
	local LoadedAnimation = Animator:LoadAnimation(Animation1)
	

	LoadedAnimation:Play()
	LoadedAnimation:GetMarkerReachedSignal("Hitbox"):Connect(function()
		print("Marker 'Hitbox' reached.")
	end)
end)

I would try doing it on the client instead of the server.

Instead of using MarkerReachedSignal, I named the keyframes and used AnimationTrack.KeyframeReached.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.