Need help with client-server lag

I want smooth knockback. I’m assuming, because of the client-server lag, that creating the force on the server is NOT what I should do. Thing is, I don’t know any other way on how to do it. See, the knockback NEEDS 2 variables, “v” (the target) and “player” (the attacker, specifically for the way he is facing so that the knockback can go in that direction). “v.Parent” is a player presumably.

I’ve already tried changing something about v and then having a PlayerScript dedicated to seeing that change and applying the knockback, but the thing is I also need the player who DID the attack.

The solution probably has something do with firing the target’s client during the server event, but any time I put “player” as a variable in a client event, it reads it as nil.

I have no idea what to do. Any help is greatly appreciated!

Could you post the code on how your listening for the event on the client?

Of course!
This is the FireClient in the server script:

bke:FireAllClients(player, v)

and then the client:

bke.OnClientEvent:Connect(function(player, v)
	local knockbackdir = player.Character.HumanoidRootPart.CFrame.LookVector
	local bg = Instance.new("BodyGyro")
	bg.Parent = v.Parent:WaitForChild("HumanoidRootPart")
	bg.D = 0
	bg.P = 500000
	bg.CFrame = CFrame.lookAt(v.Parent:WaitForChild("HumanoidRootPart").Position, knockbackdir)
	local att = Instance.new("Attachment")
	att.Parent = v.Parent:WaitForChild("HumanoidRootPart")

	local vf = Instance.new("VectorForce")
	vf.Parent = v.Parent:WaitForChild("HumanoidRootPart")
	vf.Attachment0 = att
	vf.Force = Vector3.new(0,0,20000)
	wait(0.25)
	vf:Destroy()
	bg:Destroy()
	att:Destroy()
end)

The problem is that I don’t know how to put this INSIDE the target (it’s currently in the player). If it were in the target, since the movement is local, it should be translated to the server perfectly (as it does with my dashes).