Knockback delay

knock back is delayed whether i use remote events to run the knockback on the cilent or i just set the knockback onto the player on the server

Hey, I’m not sure how much experience you have on forums, but I would recommend giving as many details as you can. For example you have already provided a video, but also providing your script and other details is helpful to those who want to help you.

Also are you using forces or something else to deal the knockback?

my bad. this is the script for the main knockback function

function module:KnockBack(Char, Power, Dir, Time, Max)
	local Hrp = Char["HumanoidRootPart"]
	local RootAttach = Hrp["RootAttachment"]

	local Force = CreateLinear(Power, Dir, Max) --- creates linear velocity

	Force.Attachment0 = RootAttach
	Force.Parent = workspace.VFXFolder

	game.Debris:AddItem(Force, Time)
end
function module:Initi(Char, Power, Dir, Time, Max)
	local plr = Players:GetPlayerFromCharacter(Char)

	--module:KnockBack(Char, Power, Dir, Time, Max) -- this is to test knockback done on server

	if plr then -- if it is player, they send a remote event to a client script that uses the same knockback module
		KBPacket:FireClient(plr, Char, Power, Dir, Time, Max)
	else --- this is used for npcs which will be ran on server side
		module:KnockBack(Char, Power, Dir, Time, Max)
	end
end

when I would hit an enemy, the server calls all players involved to simulate the knockback on their own client. Other than that Npcs, Bosses, etc will be knocked back by the server.

I think it might be a SetNetwork issue because the knockback looks smooth on the npc when it’s network-claimed by the player. But some games like TSB or JJS has M1 knockback that are synced with Player and the Player or Npc Hit.