How to make an Actual Boomerang

So I have been coding a Boomerang System but it just seems doesn’t work
Any suggestion on how to do this and I AM NOT ASKING for CODE I am just asking for an example

Similar to

How to "Throw" a Weapon

Extra

PS:
I’ll be back I’ll go for now

1 Like

can anybody help me here FWIW this is really important since it’s probably one of my main things to get done.

1 Like

Sorry but we will require more information especially for what is not working? and for this:

Aren’t their examples given in the thread you listed? Especially from @loveicicIe he gave the full client script.

1 Like

It really depends on how you want it to work. What I personally would suggest you do is create a “projectile” with a raycast-velocity simulation.
What I mean by that is that you create a projectile (In the shape of a boomerang) that updates its position every frame (RenderStepped if you want it local, Heartbeat if server-sided) based on a Vector3 value which we will call Velocity. Upon creation, it’s given an InitialVelocity towards the mouse position. Every time before this projectile moves, you send a raycast to its next position (Raycast from CurrentPosition to CurrentPosition + Velocity * TimeStep) and if it hits something, it’s up to you to decide what happens. If it doesn’t, however, on every timestep you should apply to the boomerang’s Velocity an acceleration towards the player (Velocity += (HumanoidRootPart.Position - Boomerang.Position).Unit * TurnBackSpeed * TimeStep) so that it will slowly go back and actually curve if you move around. This should create a boomerang effect that feels natural. You can play around with the InitialVelocity and TurnBackSpeed to get the effect you want.

This would come out pretty raw, but it would do the job. If you want a super cool curved effect, you’re going to need a lot of math, and for that, you can only do a lot of research and test until you get it. Good luck!

3 Likes

made a bit of progress and it’s great but this checking code

for _, Tools in pairs(Character:GetChildren()) do
			if Tools:IsA("Tool") then
				CurrentTool = Tools
				CurrentPartToMove = Tools.Handle
				break
			elseif not Tools:IsA("Tool") then
				-- no tools equipped
				-- fire server to send request proxy to equip CurrentTool
				SIGNAL_EVENT:FireServer("NoTools")
				delay(1, function()
					if Tools:IsA("Tool") then
						CurrentTool = Tools
						CurrentPartToMove = Tools.Handle
					end
				end)
				break
			end
		end

returns nil and I meant null or nil

1 Like

Use RayCasting which is used to calculate the position the boomerang needs to go depending on your mouse position and velocity which controls how fast the boomerang should move

2 Likes

I would use the physics engine and vector forces to help run it. Like a vector force facing up with allignment set to world, play around with it until it acts like it’s in low gravity. Then add another vector force which tries to push it away from the player, use a script to make this turn off, then a line force joined to the player to make it turn back. You may also want it to abort and turn off it’s forces if it collides (:Touched event) so that it can crash. This is how I would do it as I know nothing about raycasting

1 Like

could you explain this a little better or provide some code examples?

1 Like