Fire client bugging

so my framework is when you want to do effects, you fireallclients, or for animation fireclient, and in replicated first i got this:

repStorage.Remotes.ClientEffects.OnClientEvent:Connect(function(action, ...)
	local info = ...;

	if effects[action] then
		effects[action](info)
	end
end)

which is supposed to take argument from fireclient

ClientEffects:FireClient(plr, "LoadAnim", {info}) 

but its giving me an error for some reaosn
image
anyone have an idea on how to fix this

I need some more code to see what’s going on. What is effects? Where is effects located?

Effects is a module script inside replicated storage, when for example im doing an ability where i click mouse button one, and want to play an animation i do
ClientEffects:FireClient(plr, “LoadAnim”, {Animation = animation})
ClientEffects is a remote event inside remotes folder in replicated storage, “LoadAnim” is supposed to be a function inside the module script that looks like this:

fx.Animation = function(...)
	local info = ...;

	local phase,animation = info.Phase,info.Animation
	
	print("animation")
	
	if phase == 1 then
		local anim = lp.Character.Humanoid.Animator:LoadAnimation(animation)
		anim:Play(info.fadeTime or .1)
		anim:AdjustSpeed(info.Speed)
	elseif phase == 2 then
		for _,v in pairs(lp.Character.Humanoid.Animator:GetPlayingAnimationTracks()) do
			if v.Animation == animation then v:Stop(info.fadeTime or .1) end
		end
	end
end

First of all it’s then instead of LoadAnim, Animation. And Second you should need to require the module an dnot just module[] require it and do module[]

1 Like

Damn i fried my brain so much with figuring out this code i messed this up lmao. It works, thank you so much man <3

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