Animation Events In Module Script Not Working The First time

I’m using a :GetMarkerReachedSignal Event in a module script to slow down an animation but whenever I use it the first time of playing it doesn’t work, but works any other time after, I’m wondering why and how to fix it so it runs properly the first time as well.

CODE:

local module = {}

local RS = game:GetService("ReplicatedStorage")
local Animations = RS:WaitForChild("Animations")

function module:Activate(player : Player, ... : {})
	local data = (...)
	
	local character = player.Character or player.CharacterAdded:Wait()
	local humanoid = character:WaitForChild("Humanoid")

	local animation1 = humanoid:LoadAnimation(Animations.Skills.LDrop.Inital)
	
	animation1:Play()
	
	animation1:GetMarkerReachedSignal("stop"):Once(function()
		animation1:AdjustSpeed(0)
	end)

end

return

preloading animations on server worked (didn’t know you could preload using contentprovider on server)

Preload the animation on client instead. The server loads everything instantly IF I’m correct.

the events are on the server and i already was preloading animations on the client but it fixed when i preloaded it on server and client

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.