Sounds simple but im not used to this stuff, im using a tool to activate an ability that has an animation and i want to use keyframe events (added in moon animator) and it wont pick up the function
heres the tool script (local)
local Tool = script.Parent
local Player = game:GetService("Players").LocalPlayer
local Char = Player.Character
local Hum = Char:FindFirstChildOfClass("Humanoid")
local Animator = Hum:FindFirstChildOfClass("Animator")
local RS = game:GetService("ReplicatedStorage")
Tool.Activated:Connect(function()
local Track = Animator:LoadAnimation(script.BlackFlashWindup)
Track:Play()
Track:GetMarkerReachedSignal("Hitbox"):Connect(function()
print("event")
RS.BlackFlashWindup:FireServer()
end)
end)
Keyframe events are not markers. Keyframe events are deprecated by Roblox (still usable), but markers are what you should be using.
I don’t know if Moon Animator uses either markers or keyframe events, but if you are only reliant on keyframe events then you should look into Track.KeyframeReached.
Also I suggest connecting your event before calling Track:Play(). This wont fix your problem but it’s good practice.