i tried to fire a server when a keyframe marker reached but it wont work can anyonehelp also i already tried track:GetMarkerReachedSignal("Strike"):Connect(function() game.ReplicatedStorage.CombatEvent:FireServer(track) print("hi") end)
but it doesnt work
the error is saying that track is nil when you are initiasing the event listener on it, can you send more of the code so we can see how you are setting it up?
local uis = game:GetService("UserInputService")
local hum = script.Parent.Humanoid
local animator = hum:WaitForChild("Animator")
local combo = 0
local cooldown_Num = 0.7
local cooldown = false
local cooldown2 = false
local anims = {
"http://www.roblox.com/asset/?id=18539268118",
"http://www.roblox.com/asset/?id=18539296931",
"http://www.roblox.com/asset/?id=18541677368"
}
local animation = Instance.new("Animation")
uis.InputBegan:Connect(function(input, gameProcessedEvent)
if cooldown2 == false then
if input.UserInputType == Enum.UserInputType.MouseButton1 and not gameProcessedEvent then
cooldown2 = true
combo = combo +1
if cooldown == false then
print(combo)
animation.AnimationId = anims[combo]
local track = animator:LoadAnimation(animation)
track:Play()
track:GetMarkerReachedSignal("Strike"):Connect(function()
game.ReplicatedStorage.CombatEvent:FireServer(track)
print("hi")
end)
task.wait(0.5)
cooldown2 = false
if combo == 3 then
cooldown = true
task.wait(cooldown_Num)
cooldown = false
combo = 0
end
end
end
end
end)