The part isn't anchored and I destroy the weld on it so I have no idea why its not working
local target
script.Parent.target.Event:Connect(function(player, targett)
target = targett
end)
while true do
wait()
if script.Parent.inRange.Value == true then
wait(5)
print("shooting arrow")
--Clone arrow and make original one invis--
local orig = script.Parent.Bow.Arrow
local clone = orig:clone()
clone.Parent = script.Parent.Bow
local weld = Instance.new("Weld")
weld.Parent = clone
weld.Part0 = clone
weld.Part1 = script.Parent.Bow.Part
orig.Transparency = 1
clone.Orientation = orig.Orientation
clone.Position = orig.Position
local bodyVel = Instance.new("BodyVelocity")
bodyVel.Parent = clone
bodyVel.MaxForce = Vector3.new(math.max, math.max, math.max)
bodyVel.P = 50000
local Direction = (target.Position - clone.Position).Unit
weld:Destroy()
bodyVel.Velocity = target.Position * 100
end
end
