How can I stop the parent property get locked and have a stronger bodyVelocity?

  1. What do you want to achieve? A pushing ability

  2. What is the issue? the body velocity is very weak and I keep getting an error saying The Parent property of BodyVelocity is locked, current parent: NULL, new parent HumanoidRootPart

  3. What solutions have you tried so far? None yet since I don’t know how it works and the hub didn’t have anything useful

here’s the script

local bv = Instance.new("BodyVelocity")
bv.Velocity = CFrame.new(script.Parent.Parent.Parent.HumanoidRootPart.Position).lookVector * math.huge
bv.P = math.huge

script.Parent.RemoteEvent.OnServerEvent:Connect(function(player,mouseHit)	
	local target = mouseHit and mouseHit.Parent

	if target and target:FindFirstChild("Humanoid") then
		game.Debris:AddItem(bv, 3)
		bv.Parent = target:FindFirstChild("HumanoidRootPart")
	end
end)

all help is appreciated

1 Like

You’re referring to the LookVector of a cframe with orientation 0 which basically brings to a default direction everytime, i suggest you to generate the instance when the event gets fired, also if you want a push i suggest BodyForce lastly, never multiply velocity by math.huge

2 Likes