this is the code i use when a certain player uses a tool
local CharPos = Char.HumanoidRootPart.Position
local Region = Region3.new(CharPos-Vector3.new(10,10,10),CharPos+Vector3.new(10,10,10))
local RTable = workspace:FindPartsInRegion3(Region, nil, 20)
for i,v in pairs (RTable) do
if v.Parent ~= Char and v.Parent:FindFirstChild("HumanoidRootPart") ~= nil and v.Parent:FindFirstChild("Humanoid") ~= nil then
print(v.Parent.Name)
local humanoidRootPart = v.Parent:findFirstChild("HumanoidRootPart")
local bodyv = Instance.new("BodyVelocity",humanoidRootPart)
bodyv.MaxForce = Vector3.new(40000,40000,40000)
bodyv.Velocity = humanoidRootPart.CFrame.LookVector * -100
game.Debris:AddItem(bodyv,0.2)
end
end
it works but when the player faces away from the "certain player" then he gets pulled in instead, Is there away way to fix that?
