Ahoy! So what the code is supposed to do is when the player clicks with the tool equipped, an arrow is welded to their hand then it will disappear. The only problem is that the arrow would only appear once, if the tool is clicked again, the arrow will not be there. Also if the tool is unequipped and re equipped its not there either. This code is in a local script inside of the bow and arrow tool.
Here is the code:
debounce = true
script.Parent.Equipped:Connect(function(Mouse)
debounce = true
Mouse.Button1Down:Connect(function()
if debounce == true then
local Character = game.Players.LocalPlayer.Character
local arrow = game.ReplicatedStorage.Arrow
arrow.Transparency = 0
arrow:Clone()
arrow.Transparency = 0
arrow.Parent = workspace
script.Parent.Weld.Part0 = arrow
script.Parent.Weld.Part1 = Character["Left Arm"]
script.Parent.Weld.C0 = CFrame.new(-0.5,0,2)
script.Parent.Weld.C0 = script.Parent.Weld.C0 * CFrame.fromEulerAnglesXYZ(math.rad(90),math.rad(30),0)
debounce = false
wait(1)
arrow.Transparency = 1
debounce = true
end
end)
end)
script.Parent.Unequipped:Connect(function()
end)
Help would be appreciated!