Can’t you just destroy the BodyVelocity either after the force is applied or when the player lands?
Example:
hum.StateChanged:Connect(function(old, new)
if old == Enum.HumanoidStateType.Freefall and new == Enum.HumanoidStateType.Landed then
bv:Destroy()
end
end)
If you need more consistency consider trying BodyPosition instead of BodyVelocity.
It’s hard to guess what you mean by just “not really good at all”, could you send some footage or at least elaborate further about what’s wrong with your current grapple hook? Current code looks alright to me.
Regardless, I’ll try to answer based on a grapple hook thing I made recently, everything below is assuming you still use the code you provided.
First, I’d personally make it entirely on the client to avoid unnecessary code and input delays (unless you have any reason to make it server sided such as exploiting, 100% up to you).
Going to assume this means you don’t care about visuals so i’m skipping that. To resume it, you could use attachments on the hands/target and beams, as well as animations for a rope/grapple hook visual effect.
And last, to prevent physics issues (which is what I assume makes your script “not really good at all”?) I personally use the following line to prevent the humanoid from going crazy if they collide with something on the middle of a transition:
hum:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
As well as:
hum.AutoRotate = false
char:SetPrimaryPartCFrame(CFrame.new(root.Position, target.Position))
To:
.Prevent the player from rotating their character while the grapple hook is currently being used.
.Make them face the correct position.
All of these are obviously set back to their default values once the transition is done, which is something that doesn’t look like you did when it comes to destroying the BodyVelocity.
As an additional note, there is already a pretty good available grapple hook resource:
[open source] sekiro grapple hook
And in case you want to check the code of mine for reference, here’s a file and a preview. You’ll have to make it work with the mouse yourself tho:
Grapple Hook-Movable Boxes System.rbxl