Local script
local function ToolActivated(Action)
if not Tool then return end
local AnimationID = ToolAnims:GetAnimationID(Tool.Name, Action)
animationTrack:GetAnimation("rbxassetid://"..AnimationID, animator)
local MarkerSignal = animationTrack:PlayAnimation("Dash")
if MarkerSignal then -- If played animation reaches a certain markersignal
print(MarkerSignal)
end
end
Module script
function module:PlayAnimation(MarkerSignal)
self.animationTrack:Play()
if MarkerSignal then
self.animationTrack:GetMarkerReachedSignal(MarkerSignal):Connect(function()
return "Signal Reached"
end)
end
end
“Signal Reached” is never printed out. Although I have tried printing out a string within self.animationTrack:GetMarkerReachedSignal(MarkerSignal):Connect(function() and it does work.