Make player be affected by knockback

so i a player attached to a rope and when you hit the player it should push them back with BodyVelocity, however, it does not work. (it does work against players not attached to rope though)
i have tried so many different things and none have seems to work. can players not be pushed while ropes?

1 Like

Lots of reasons why knockback doesnt work, humanoids and network ownership are the main reasons.

See the test place here:

the thing is the “player” on the rope is actually an NPC, and body velocity or anything similar isnt working on them, thats the problem extremely simplified

Still that just means it could be a network ownership problem.

Are you applying the knockback the same way as in the test place I sent on the server? That could be the issue as well.

why would you need to set network owner if there is one player in a server hitting an NPC, which isnt even a player object and i see you are using AssemblyLinearVelocity which i tried to and surpringsly nothing happened

Use BodyVelocity:

local B = Instance.new("BodyVelocity")
B.Parent = NPC

B.MaxForce = Vector3.new(80000, 80000, 80000)
B.Velocity = PlayerWhoHit:FindFirstChild("HumanoidRootPart").CFrame.LookVector * 10

cmon at least read the post bruh

I did, but it seems unlikely it won’t work.

keep in mind, the NPC is attached to a rope, and is ragdolled using ball socket contraints

Even if the NPC is not a player object the network owner will be the server. This will cause issues if you are applying the physics client sided unless the Client is able to take network ownership over them (usually when they stand close distance, if they are far away it will not work).

I thought I already told you the reason why it doesn’t happen?

Have you tried out the place file and did some experimentation with network ownership which causes physics to not work?

Pretty sure you could replace assembly linear velocity with body velocity or any other physics method and it’ll work as long as the network ownership is correct ex: server network ownership has, and server applying body velocity/Assembly linear velocity, or client has network ownership and client applies body velocity/AssemblyLinearVelocity.

2 Likes

here is what i did:

		local BodyVelocitySwing2 = Instance.new("BodyVelocity")
		BodyVelocitySwing2.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
		BodyVelocitySwing2.P = math.huge
		BodyVelocitySwing2.Velocity = Char.HumanoidRootPart.CFrame.LookVector * 15
		BodyVelocitySwing2.Parent = hitPlayerHRP
		print(BodyVelocitySwing2.Parent)
		print(BodyVelocitySwing2)
		hitPlayerHRP:SetNetworkOwner(nil)
		game.Debris:AddItem(BodyVelocitySwing2, .5)

and i get the error:

Network Ownership API cannot be called on Anchored parts or parts welded to Anchored parts.

is this because its on a rope or because its an NPC?

Is the NPC anchored? Any part of it? When you use the Rig Builder plugin from Roblox it spawns one with the root part Anchored.

1 Like

sad that the problem was the hrp was anchored

1 Like