RunService.RenderStepped:Connect(function()local S=localPlayer.Character if not S then beam.Enabled=false return end local z=S:FindFirstChild("\072\101\097\100")if not z then beam.Enabled=false return end beam.Enabled=true local m=z.Position local r=mouse.Hit.p attachment0.Position=m attachment1.Position=r end)
-- connect to RenderStepped (update every frame)
RunService.RenderStepped:Connect(function()
	-- make sure the character exists
	local character = localPlayer.Character
	if not character then
		-- disable the beam
		beam.Enabled = false
		return
	end

	-- make sure the head exists
	local head = character:FindFirstChild("Head")
	if not head then
		-- disable the beam
		beam.Enabled = false
		return
	end

	-- enable the beam
	beam.Enabled = true

	-- define origin and finish
	local origin = head.Position
	local finish = mouse.Hit.p

	-- move the attachments
	attachment0.Position = origin
	attachment1.Position = finish
end)
