Sound doesn't stop when I do :Stop()

The title says it all. I have a sound inside of a model in the workspace that is playing, and when I use :Stop() the system just ignores it. Sorry for the bad code, I rushed when making this but it works.

local attacking = script.Parent:WaitForChild("Attacking")

	if attacking.Value == true and script.Parent:FindFirstChild("HumanoidRootPart") ~= nil and script.Parent:FindFirstChild("Humanoid") ~= nil and script.Parent:FindFirstChild("Animate") ~= nil then
		script.Parent.Humanoid.WalkSpeed = 0
		game.Workspace.Sounds.Pannels.Static.TimePosition = 0
		game.Workspace.Sounds.Pannels.Static:Play() -- Play
		script.Parent.Animate.idle.Animation1.AnimationId = "rbxassetid://8316402154"
		script.Parent.Animate.idle.Animation2.AnimationId = "rbxassetid://8316402154"
		script.Parent.HumanoidRootPart.CFrame = game.Workspace.Map.Teleporters.OfficeTP1.CFrame
		script.Parent.HumanoidRootPart.CFrame = game.Workspace.Map.Teleporters.OfficeTP1.CFrame
		if game:GetService("ReplicatedStorage").MaskUp.Value == true then
			game.Workspace.Sounds.Pannels.Static:Stop() -- Stop
			attacking.Value = false
			script.Parent.Humanoid.WalkSpeed = 4
			script.Parent.Animate.walk.WalkAnim.AnimationId = "rbxassetid://8137104876"
			script.Parent.Animate.idle.Animation1.AnimationId = "rbxassetid://8137256167"
			script.Parent.Animate.idle.Animation2.AnimationId = "rbxassetid://8137256167"
			script.Parent.HumanoidRootPart.CFrame = game.Workspace.Map.Teleporters.ToyBonnieTP.CFrame
			game:GetService("ReplicatedStorage").Special:FireClient(game:GetService("Players"):GetPlayerFromCharacter(script.Parent),"Toy Bonnie",1)

can you put


and see what it prints?
I’d recommend debugging on what the issue might is
also make sure it actually runs the code

On play clone the sound and parent it
then play it

On stop simply delete the sound itself

1 Like

Okay so I figured out it was another script interfering with the MaskUp.Value, I fixed it so that wouldn’t happen and I also added a sound stop in the else.

should check if maskup value gets changed, im not sure if you verified that but thats what I would do

1 Like