script:
local tool = script.Parent
local sound = tool:WaitForChild("Sound")
tool.Equipped:Connect(function()
sound.Resume()
end)
tool.Unequipped:Connect(function()
sound.Pause()
end)
if you want the sound to start from the beggining each time you equip it, use this script:
local tool = script.Parent
local sound = tool:WaitForChild("Sound")
tool.Equipped:Connect(function()
sound.Play()
end)
tool.Unequipped:Connect(function()
sound.Pause()
end)