It’s detecting the MouseButton1, not equipping. Try using tool.Equipped
Also, for detecting clicks, I suggestion using Tool.Activated, it looks much cleaner and shorter and has the same function
Your script actually mean, when you click on your mouse it play the sound no matter if there is a weapon equiped.
Move the sound in the “Handle” part of your weapon tool
Add a script on the weapon tool
local Tool = script.Parent
Tool.Activated:Connect(function()
local Handle = Tool:WaitForChild("Handle" ,5)
if Handle ~= nil then
local Sound = Handle:WaitForChild("Beep" ,5)
if Sound ~= nil then
Sound:Play()
end
end
end)