I’m trying to fire the event when a part comes in contact with the handle while the animation is playing
Once activated, it is constantly detecting for a collision with another part.
Even after the animation has stopped playing, it is still running
print(hitPart);
ClickEvent:FireServer(LocalPlayer, hitPart);
script:
script.Parent.Activated:Connect(function()
local Humanoid = Character.Humanoid;
local AnimationTrack = Humanoid:LoadAnimation(Animation);
AnimationTrack:Play()
if AnimationTrack.IsPlaying == true then
Sword.Touched:Connect(function(hitPart)
print(hitPart);
ClickEvent:FireServer(LocalPlayer, hitPart);
end);
end;
end);