Why doesn't this make it work like a boomerang?

i’ve been working on a script and i’ve gotten to a point where the throw works and the script that’s meant to bring it back like a boomerang just doesn’t work. any help?

	wait(0.5)
	bv.Velocity = -character.HumanoidRootPart.CFrame.LookVector*10
	task.wait(0.5)
	bv.Velocity = -bv.Velocity
	wait(0.5)

thanks to another kind person for the patching with it, but really. it’s hard and i’m considering trying to just switch to tweening or bodypos instead

here is the concept i am trying to acheive:
https://gyazo.com/2632496a14e0609b4c114aed2835fd6b
here is what happens:
[ ignore the speed ]
https://i.gyazo.com/f3b22698ab194e5eab015f4b7550b5ec.mp4

There isn’t really a simple way to achieve this. Try just mapping the position of the HumanoidRootPart and just slowly vector lerp the offset of the object to it.

Haven’t tested the script but something like this:

bv.Velocity = hrp.CFrame.LookVector*-10

local start_tick = tick()

repeat 	
	bv.Velocity = bv.Velocity:Lerp(hrp.CFrame.p-boomerang.Position,0.1)	
until (boomerang.Position-hrp.Position).Magnitude < 3 and start_tick-tick() > 3
1 Like

it’s quite laggy and doesn’t work.

i hate to be a beggar but do you have any more knowledge on this that you could bestow?

like for example: where would this script go in this?

        wait(0.5)
        wait(0.5)
	axeclone:Destroy()
	handle.Transparency = 0
	wait(1)
	isCooldown = false
end)

Once the magnitude of axe is in a certain vicinity and it has been at least 1 second of the axe throw you would probably put that at the end of it.

If you cant figure it out I would recommend animating the axe in blender and using recasts to detect if the axe hit anything

what do you mean by animating it in blender?

You can use a LineForce to simulate what @LegosAreGood05 said originally with 0 lines of code, perhaps this take on his solution would work somewhat nicely

You just need two attachments and the line force will attempt to move them together

ah, let me try that, thank you for the suggestion otherwise

actually, i don’t wanna try that. i am just trying to do it with bodypos now

1 Like