So lately I've been trying to script a Boomerang using a BodyPosition to make it go a distance away from the player. I have 2 problems. 1st off I have made the position for the body position add 20 studs away from the player on the X axis. I need it to go 20 studs in front of the player. I tired this with Lookvector but had no luck. My second problem is that the Tool seems to be activated 100% of the time rather then just on a click. So as soon as I pick the tool up it just goes to it's BodyPosition's Position without me activating it. I tried Explaining best as I can but it might be a bit hard to understand.
Tool = script.Parent
function onActivated()
wait()
Tool.Handle.BodyPosition.position = Tool.Parent.Torso.Position + Vector3.new(20,0,0) --This is where I don't know how to make the Position go 20 studs in front of the player rather than just 20 studs on the X axis.
Tool.Parent = game.Workspace
end
Tool.Equipped:connect(onActivated)

1 comment
Okay I understand thanks! Also I figured out how to use look vector for this but it is still buggy so I will ask about that later