When it's night, this script is supposed to destroy this sound that is playing in the workspace, but it doesnt. It places the sound in just fine, but wont destroy it. This is really annoying me. Any help?
while true do wait() if game.Lighting.ClockTime >= 7 and game.Lighting.ClockTime <= 17 then if workspace:FindFirstChild("Seagull") == nil then local sound = script.Seagull:Clone() sound.Parent = workspace sound:Play() end if game.Lighting.ClockTime <= 6 and game.Lighting.ClockTime >= 18 then if workspace:FindFirstChild("Seagull") ~= nil then workspace.Seagull:Destroy() end end end end
thanks for reading