What's the best way to handle animations on the server through a module?

I’ve heard constantly loading animations could potentially cause memory leaks. I don’t know how I would achieve this without compromise.

Here’s a clippet from a module, being used as an ability:

	Execute = function(plr)
		local char = plr.Character
		if not char then return end
		local hum = char:FindFirstChildOfClass("Humanoid")
		local hrp = char:FindFirstChild("HumanoidRootPart")
		if not hum or not hrp then return end
		local animator = hum:FindFirstChildOfClass("Animator")
		if not animator then return end
		animator:LoadAnimation(script.Taunt):Play() --I need a way to tackle this better.
	end

Nevermind, turns out it’s not really that impactful unless you’re doing stuff with the animation.

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