ok it now says expected then when parsing if statement got '=' here code:
`local player = game:GetService("Players").LocalPlayer local mouse = player:GetMouse() local humanoid = player.character.humanoid
if humanoid.health = 0 then stopsound() else if humanoid.health < 0 then stopsound() end end
function playsound()
sound = Instance.new("Sound")
sound.Parent = player.Character
sound.SoundId = "rbxassetid://9815509707"
sound:Play()
end
local function stopsound()
sound:Stop()
sound:Destroy()
end
mouse.Button1Down:Connect(playsound)
mouse.Button1Up:Connect(stopsound) humanoid.health.changed:connect(function() end)
function playsound()
sound = Instance.new("Sound")
sound.Parent = player.Character
sound.SoundId = "rbxassetid://9815509707"
sound:Play()
end
local function stopsound()
sound:Stop()
sound:Destroy()
end
mouse.Button1Down:Connect(playsound)
mouse.Button1Up:Connect(stopsound) humanoid.health.changed:connect(function() end)`

2 comments
ok i defined humanoid not work
local player = game:GetService("Players").LocalPlayer local mouse = player:GetMouse() local H = 0 local local Humanoid = game.LocalPlayer:FindFirstChild(Humanoid) function playsound() sound = Instance.new("Sound") sound.Parent = player.Character sound.SoundId = "rbxassetid://9815509707" sound:Play() end local function stopsound() sound:Stop() sound:Destroy() end mouse.Button1Do