Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Sound still playing after tool unequipped?

Asked by 3 years ago

Sound still plays after tool is unequipped, even though I told it not to.

local player = game:GetService("Players").LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local h = char:WaitForChild("Humanoid")
local anim = h:LoadAnimation(script.Parent:WaitForChild("Idle"))
local song1 = script.Parent.BeoDatMayTroi

local tool = script.Parent

tool.Equipped:Connect(function()
    anim:Play()
    song1:Stop()
end)



tool.Activated:Connect(function()
    song1:Play()
end)

tool.Unequipped:Connect(function()
    song1:Stop()
    anim:Stop()

end)
0
Can you show a picture of the sounds and the scripts? dinko13579 35 — 3y
0
well, the sound does play when the tool is activated, but not when it is unequipped. The scripts are there, and the sound is just in the tool. minerpepper 18 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

Agh!!! Studio was being weird, the sound does stop. No idea why it didn't work before :P.

Ad

Answer this question