Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

is :GetMarkerReachedSignal and Animation events broken?

It keeps firing more than once, and stacks each time

like first time i fires it, it only fires once, the second time, it fires TWICE at the same time the third time, it fires THRICE at the same time

and so on

this is really frustrating any possible reason why this is happening?

this guy also got the same exact problem : https://devforum.roblox.com/t/keyframe-reached-fired-multiple-times-keep-stacking/437415

Also i noticed, the animation you saved will randomly deletes its event or go back to a previous set of events if you updated your animation in the past

so sometimes my script will just stop working and i need to export my already fixed animation to the animation editor just to find that my animation events removed or changed.

script :

--Before this line, its just variables refferencing humanoid, player, mouse, and animation folder
-- loadedAnim is just a table that holds animation track loaded to humanoid


mouse.Button1Down:connect(function()
		loadedAnim[1]:Play()
		loadedAnim[1]:GetMarkerReachedSignal("Stanced"):Connect(function()
			print 'test'
		end)
end)

4 comments

0

The bug seems to be recent, so this is probably roblox animation screwing up

0

Can you provide a script?

0

It was just a simple play on click animation script and print something if it reached an animation event, but ill provide it

0

haha noob

1 answer

✓ Accepted answer

The problem isn’t the event but your implementation. The connections keep piling up in your script since with each new click, another GetMarkerReachedSignal connection is made. Since the same track is used again and again, you should make one connection outside the mouse connection while playing the track again inside the connection:


mouse.Button1Down:connect(function()
        loadedAnim[1]:Play()
end)

loadedAnim[1]:GetMarkerReachedSignal("Stanced"):Connect(function()
   print('test') 
end)

1 comment

0

Ah ok thankss

This discussion is preserved as it was. New answers, comments, and votes are closed.