What do you want to achieve? Keep it simple and clear!
I have an NPC “Cashier” that sleeps at the desk but every now and then the animation brings his head up and he looks around, and then he goes back to sleep. I added markers to when he wakes up and goes back to sleep so that the sound that is on loop and playing with stop and play again when needed.
What is the issue? Include screenshots / videos if possible!
The event is never called. The prints inside of the event don’t register neither do the functions I’m calling act out.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I checked out the only post the show up when I searched yet it was only about setting the time position, where I want to pause and resume a sound whenever a marker is reached in an animation.
local animation = script.Idle
local humanoid = script.Parent.Humanoid
local dance = humanoid:LoadAnimation(animation)
local sleep = script.Parent.Head.Snore
dance:GetMarkerReachedSignal("WakeUp"):Connect(function(paramString)
print(1)
--sleep:Pause()
sleep:Stop()
end)
dance:GetMarkerReachedSignal("GoBackToSleep"):Connect(function(paramString)
print(1)
--sleep:Resume()
sleep:Play()
end)
dance:Play()