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 the animation to signal when it reaches the hitbox marker. -
What is the issue? Include screenshots / videos if possible!
It doesn’t do anything. -
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)