Remote event do not work

I’m trying to animation play on client via remote event

Here there code:

function OnToolActivation()
	print("aa")--this prints
	workspace.WilkaAnim:FireClient(ppl, script.Animation)--this line were wrapped in pcall()
	print("ee")--this prints too		
end

And local side

script.Parent.OnClientEvent:Connect(function (ani)
	print("bruh")--this do not prints same as everything after it
	local a = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(ani)
	print("WORK")
	a:Play()
	a.Stopped:Wait()
	script.Parent:FireServer()
	print("end")
end)

For some reason remote event just don’t fire client side. I tryed wrapping event firing in the pcall() and it returned “attempt to call a nil value”

Localscripts don’t work when they are a descendant of workspace and not parented by a character model.

3 Likes

Now it works, thanks, but animation don’t play anyway… I guess it’s should be at other topic