I want to make a system that knocks players back like Minecraft basically.
The issue is it’s not working but with no errors at all. I’ve tried so many things and this is the closest I’ve gotten so far. Also, my code is not the cleanest, I usually clean up my code after it works completely.
This is my code:
local NameOfConvict = Player.Name
local FindConvict = game.Workspace:FindFirstChild(NameOfConvict)
local ConvictHRP = FindConvict:FindFirstChild("HumanoidRootPart")
local VictimHRP = hitPart.Parent:FindFirstChild("HumanoidRootPart")
local BodyForce = Instance.new("BodyForce", VictimHRP)
BodyForce.Force = Player.Character.HumanoidRootPart.CFrame.LookVector*Vector3.new(CFrame.lookAt)
Please help me to fix this situation!