local Players = game:GetService("Players").LocalPlayer
local Tool = script.Parent
local gun = script.Parent.Handle
local mouse = Players:GetMouse()
local deb = true
Tool.Equipped:Connect(function()
script.Parent.Beam.Enabled = false
mouse.Button1Down:Connect(function()
if game.Workspace.Tree.Name == "Tree" then
script.Parent.Beam.Enabled = true
script.Parent.Beam.Attachment0 = Tool.Handle.Main_Attatchment
script.Parent.Beam.Attachment1 = workspace.Tree.Atta.TreeAttatchment
workspace.Tree.Atta.TreeAttatchment.Position = Vector3.new(mouse.Target.CFrame)
wait(1.5)
script.parent.Beam.Enabled = false
end
end)
end)
Right now this only affects one object named tree how would I make it affect more?

3 comments
I recommend using Tool.Activated event in replace of the Line 8 use of Button1Down.
LOLLLLLLLLL
I named it tree :]