local gun = game.StarterPack.Gun1.Handle.CFrame
local part = game.Workspace.beamtest.CFrame
local Players = game:GetService("Players")
local mouse = Players:GetMouse()
Tool = game.StarterPack.Gun1
mouse.Button1Down:connect(function()
local att0 = Instance.new('Attachment', part)
local att1 = Instance.new('Attachment', gun)
local beam = Instance.new("Beam")
att0.Position = Vector3.new(gun)
att1.Position = Vector3.new(part)
att0.Parent = workspace.Terrain
att1.Parent = workspace.Terrain
beam.color = Color3.fromRGB(144,144,144)
beam.Attachment0 = att0
beam.Attachment1 = att1
beam.Width0 = 0.2 -- starts small
beam.Width1 = 2 -- ends big
beam.Enabled = true
beam.Parent = att0
end)
Sorry for the inconvenience about all the questions! Last question probably but why won't a beam appear?

7 comments
do you have FE enabled?
why do you have 2 things defining the players mouse?
Do I?
the answer is very simple, you didnt set the parent of the beam.
O yeah
You never registered the mouse clicking.. You also don't need the mouse in line 7 https://www.robloxdev.com/api-reference/event/Mouse/Button1Down
beam.Parent = game.Workspace -- Example of setting a parent for instance